Problems Updating -- JRE-OpenJDK/JDK-OpenJDK -- PGP Signatures -- And more!

Desktop Environment: XFCE
Kernel: 6.5.11-1

Hi,

I seem to be locked in a vicious circle with respect to updating my two computers, which are practically identical in setup.

To begin:

When I tried to run updates on Manjaro yesterday, it ultimately failed due to the apparently topical jre/jdk problem, resulting in:

"conflicting dependencies:
- jre-openjdk and jre-openjdk-headless are in conflict"

Then, after doing some searches, I tried the following:

"pacman -Sy jdk-openjdk
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...
:: jdk-openjdk and jre-openjdk are in conflict. Remove jre-openjdk? [y/N] y
:: jdk-openjdk and jre-openjdk-headless are in conflict. Remove jre-openjdk-headless? [y/N] y

Packages (4) java-environment-common-3-5  jre-openjdk-21.u35-3 [removal]  jre-openjdk-headless-21.u35-3 [removal]  jdk-openjdk-21.u35-8

Total Download Size:    457.46 MiB
Total Installed Size:  1136.47 MiB
Net Upgrade Size:       943.30 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 jdk-openjdk-21.u35-8-x86_64                              457.5 MiB  3.84 MiB/s 01:59 [#################################################] 100%
 java-environment-common-3-5-any                            2.6 KiB   128 KiB/s 00:00 [#################################################] 100%
 Total (2/2)                                              457.5 MiB  3.84 MiB/s 01:59 [#################################################] 100%
(2/2) checking keys in keyring                                                        [#################################################] 100%
(2/2) checking package integrity                                                      [#################################################] 100%
error: java-environment-common: signature from "Frederik Schwan <frederik.schwan@linux.com>" is unknown trust
:: File /var/cache/pacman/pkg/java-environment-common-3-5-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: jdk-openjdk: signature from "Frederik Schwan <frederik.schwan@linux.com>" is unknown trust
:: File /var/cache/pacman/pkg/jdk-openjdk-21.u35-8-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded."

And then tried pacman with -Syu instead:

"pacman -Syu jdk-openjdk
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Starting full system upgrade...
:: Replace kuserfeedback with extra/kuserfeedback5? [Y/n] y
resolving dependencies...
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: jdk-openjdk and jre-openjdk are in conflict"

And finally had a go via pamac (I have looked at a lot of pages):

pamac install jdk-openjdk --no-upgrade; pamac update --no-aur
Preparing...

Choose optional dependencies for jdk-openjdk:
1:  java-rhino: for some JavaScript support

Enter a selection (default=none): 1

Resolving dependencies...
Checking inter-conflicts...

To install (3):
  java-environment-common  3-5       (Required By: jdk-openjdk)     extra  2.6 kB
  jdk-openjdk              21.u35-8                                 extra  479.7 MB
  java-rhino               1.7.14-1                                 extra  1.3 MB
To remove (2):
  jre-openjdk              21.u35-3  (Conflicts With: jdk-openjdk)  extra
  jre-openjdk-headless     21.u35-3  (Conflicts With: jdk-openjdk)  extra

Total download size: 481.0 MB
Total installed size: 1.2 GB
Total removed size: 202.6 MB

Apply transaction ? [y/N] y
Download of java-environment-common (3-5) started
Download of java-environment-common (3-5) finished
Download of jdk-openjdk (21.u35-8) started
Download of java-rhino (1.7.14-1) started
Download of java-rhino (1.7.14-1) finished
Download of jdk-openjdk (21.u35-8) finished
Checking keyring...                                                                                                                      [3/3]
Downloading required keys...
Error: key "7A4E76095D8A52E4" could not be imported
Error: required key missing from keyring
Error: Failed to commit transaction
Preparing...
Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
Error: unresolvable package conflicts detected
Error: Failed to prepare transaction:
conflicting dependencies:
- jre-openjdk and jre-openjdk-headless are in conflict

In addition, trying to install anything results in errors of the form,

"error: jdk-openjdk: signature from "Frederik Schwan <frederik.schwan@linux.com>" is unknown trust
:: File /var/cache/pacman/pkg/jdk-openjdk-21.u35-8-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature))"

and trying to reset the keys via the first step of ‘pacman-key --init’ results in a long long list of messages just like these…

gpg: keydb_get_keyblock failed: Invalid keyring
gpg: validate_key_list failed
gpg: mpi too large (41213 bits)
gpg: keyring_get_keyblock: read error: Invalid packet
gpg: keydb_get_keyblock failed: Invalid keyring

Running ‘sudo pacman-mirrors’ makes no difference.

WHAT SHOULD I DO???

Oliver.


Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

Maybe look at the other 1’756 already existing threads here at the forum about the same thing? :stuck_out_tongue:

Anyway… :roll_eyes: :point_down:

sudo pacman -Sy jdk-openjdk && sudo pacman -Syu

And just for your consideration, kindly also read through the following post… :point_down:

2 Likes

Despite the tone, I can remark that I’ve already done what you suggested with no good result. As specified in the (very long) post above. Reading is helpful.

As far as I can see, the only problem you are having is with unknown trust key. Plenty of topics about that, you know:

I’d start with updating keyrings first, following with the jdk part, following with the rest.

sudo pacman -Sy {archlinux,manjaro}-keyring
1 Like

I know. I read a lot of those too, alas:

sudo pacman -Sy manjaro-keyring
:: Synchronizing package databases…
core is up to date
extra is up to date
multilib is up to date
warning: manjaro-keyring-20230719-2 is up to date – reinstalling
resolving dependencies…
looking for conflicting packages…

Packages (1) manjaro-keyring-20230719-2

Total Download Size: 0.08 MiB
Total Installed Size: 0.09 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages…
manjaro-keyring-20230719-2-any 84.7 KiB 847 KiB/s 00:00 [#################################################] 100%
(1/1) checking keys in keyring [#################################################] 100%
downloading required keys…
:: Import PGP key CAA6A59611C7F07E, “Philip Müller philm@manjaro.org”? [Y/n] y
error: key “CAA6A59611C7F07E” could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

I really have read a lot of pages today, and in the more than five years on Manjaro, and more than ten on linux in general. I just can’t figure this one out.

Thank you kindly, anyway. :slight_smile:

How about one more? :wink:

Please edit your last post accordingly. I’ve done it for you this time in your first post as an example.

In this case it would seem to make very little difference. Yes for future posts, though, certainly.

Won’t change anything, but this isn’t the command I wrote. Just FYI.

Then I suggest you go over troubleshooting wiki:

https://wiki.archlinux.org/title/Pacman/Package_signing#Troubleshooting

specifically: 4.1.1 and 4.1.2, followed by my previous post.

But that is what you wrote, isn’t it? I assumed it was a delete as appropriate command. However, from your response, I assume it’s more of a batch procedure. Okay.

sudo pacman -Sy {archlinux,manjaro}-keyring
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
warning: archlinux-keyring-20231107-1 is up to date -- reinstalling
warning: manjaro-keyring-20230719-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (2) archlinux-keyring-20231107-1  manjaro-keyring-20230719-2

Total Download Size:   1.14 MiB
Total Installed Size:  1.72 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 archlinux-keyring-20231107-1-any                        1169.5 KiB  2.52 MiB/s 00:00 [#################################################] 100%
(2/2) checking keys in keyring                                                        [#################################################] 100%
downloading required keys...
:: Import PGP key CAA6A59611C7F07E, "Philip Müller <philm@manjaro.org>"? [Y/n] y
error: key "CAA6A59611C7F07E" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

I’m guessing it might be easier to wait until Manjaro 25 and reinstall from scratch, if that’s not too far in the future?

It’s brace expansion, for when you are lazy. :stuck_out_tongue: But as I said it won’t change the outcome just yet.

It’s not. Also that version numbering of rolling distro is bullshit. I just released Manjaro v24.9 now. You only need to update. :stuck_out_tongue:

Just like factorizing out in algebra. Actually, that’s quite nice. Reading about time synchronization problems now.

If I can’t fix the problem, I won’t be updating though.

If I do 4.1.2 from the troubleshooting:

Resetting all the keys

Remove or reset all the keys installed in your system by removing the /etc/pacman.d/gnupg directory (as root) and by rerunning pacman-key --init followed by pacman-key --populate to re-add the default keys.

but it doesn’t end up working, am I in a worse place than before?

It will work. Also #yolo

Yolo???

“You Only Live Once” (YOLO).

Unless you’re into reincarnation, of course. :stuck_out_tongue:

Thank you, zbe, things seem to be happening. Very nice of you.

I just don’t like to potentially mess up my computer without there being a lot of time to reinstall it before using it for work. :smile:

I’ll post progress when or if all comes to full fruition… (It will take a while to know as an update comes bundled up with changing the openjdk)

You got that backwards. These steps are for solving the mess you got into already. :stuck_out_tongue:

Since I didn’t really do anything, I would say the mess the computer got into already!

All seems to be well now, so well done. I can go back to the regular problems now!

Then there are some topics to read about: :wink:

  • Timeshift
  • Snapper
  • Rollback
  • Backup
  • btrfs

:footprints:

Actually, I normally just clonezilla the installation into an image, but to each their own!

When you use snapshots, you can:

  • create an snapshot in seconds
  • rollback to one of 50 (or more) snapshots (without wasting space)
    :footprints:

Snapshots are a really handy addition to backups