Fedora 36 - Recent Java update conflicts with Java 17

Reported here: 2203320 – When I try to update java-17 packages, I get a file conflict with java-20

It’s fixed in java-17-openjdk-17.0.7.0.7-5 (note the -5; the version you are installing is -1). But since F36 is EOL, the last update did not make it to stable repos. You can manually install it from koji like this:

sudo dnf in https://kojipkgs.fedoraproject.org//packages/java-17-openjdk/17.0.7.0.7/5.fc36/x86_64/java-17-openjdk{,-headless}-17.0.7.0.7-5.fc36.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/java-latest-openjdk/20.0.1.0.9/8.rolling.fc36/x86_64/java-latest-openjdk{,-headless}-20.0.1.0.9-8.rolling.fc36.x86_64.rpm

But you really should upgrade to a currently supported Fedora release. F37 will be supported for ~6 more months while F38 will be supported for ~1 year.

Explanation

There’s a conflict in a specific file mentioned. These build IDs are supposed to be unique to identify the exact builds of files. Somehow, both the Java 20 and Java 17 packages have identical versions of a file libjsvml.so, which produced the same build ID:

$ rpm -qplv java-{17,latest}-openjdk-headless-*.rpm | grep 5d273e920106a68e86541b187062d7dbef328a
lrwxrwxrwx    1 root     root                       80 Apr 29 00:40 /usr/lib/.build-id/a8/5d273e920106a68e86541b187062d7dbef328a -> ../../../../usr/lib/jvm/java-17-openjdk-17.0.7.0.7-1.fc36.x86_64/lib/libjsvml.so
lrwxrwxrwx    1 root     root                       88 Apr 28 23:33 /usr/lib/.build-id/a8/5d273e920106a68e86541b187062d7dbef328a -> ../../../../usr/lib/jvm/java-20-openjdk-20.0.1.0.9-3.rolling.fc36.x86_64/lib/libjsvml.so

Since the file /usr/lib/.build-id/a8/5d273e920106a68e86541b187062d7dbef328a has the same name, but different “contents” (in this case the file is a symlink to a different target), dnf won’t allow the transaction (otherwise the package installed earlier would have a file overwritten by the package installed later).

java-latest* tracks the latest Java version (which is Java 20 on F36+), while java-17* is Java 17. They are not merely the “same package with a different build number”.

2 Likes