installer
installer copied to clipboard
Problems installing temurin-17-jdk-17.0.1.0.0.12-1.x86_64.rpm under OpenSUSE
I installed temurin-17-jdk from the OpenSUSE 15.2 repo. The installation more or less succeeded, except that no alternative was installed for the java command. The following messages were produced during installation:
Additional rpm output: update-alternatives: error: alternative jrunscript can't be slave of java: it is a slave of javac update-alternatives: using /usr/lib64/jvm/temurin-17-jdk/bin/javac to provide /usr/bin/javac (javac) in auto mode update-alternatives: warning: skip creation of /usr/bin/jaotc because associated file /usr/lib64/jvm/temurin-17-jdk/bin/jaotc (of link group javac) doesn't exist update-alternatives: warning: skip creation of /usr/bin/rmic because associated file /usr/lib64/jvm/temurin-17-jdk/bin/rmic (of link group javac) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/rmic.1 because associated file /usr/lib64/jvm/temurin-17-jdk/man/man1/rmic.1 (of link group javac) doesn't exist
Looks like alternatives are not updated correctly after installation.
I added the alternative for java manually, using: update-alternatives --install /usr/bin/java java /usr/lib64/jvm/temurin-17-jdk/bin/java 1 and now java runs fine.
I am actually using OpenSUSE Tumbleweed, but the 15.2 executables run fine. I would have used the 15.3 repo, but there is no temurin-17-jdk package there yet.
I'ved added the missing JDK17 package to 15.3. I don't see your error though:
Additional rpm output:
update-alternatives: using /usr/lib64/jvm/temurin-17-jdk/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: warning: skip creation of /usr/bin/jjs because associated file /usr/lib64/jvm/temurin-17-jdk/bin/jjs (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/bin/pack200 because associated file /usr/lib64/jvm/temurin-17-jdk/bin/pack200 (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/bin/rmid because associated file /usr/lib64/jvm/temurin-17-jdk/bin/rmid (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/bin/unpack200 because associated file /usr/lib64/jvm/temurin-17-jdk/bin/unpack200 (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/jjs.1 because associated file /usr/lib64/jvm/temurin-17-jdk/man/man1/jjs.1 (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/pack200.1 because associated file /usr/lib64/jvm/temurin-17-jdk/man/man1/pack200.1 (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/rmid.1 because associated file /usr/lib64/jvm/temurin-17-jdk/man/man1/rmid.1 (of link group java) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unpack200.1 because associated file /usr/lib64/jvm/temurin-17-jdk/man/man1/unpack200.1 (of link group java) doesn't exist
update-alternatives: using /usr/lib64/jvm/temurin-17-jdk/bin/javac to provide /usr/bin/javac (javac) in auto mode
update-alternatives: warning: skip creation of /usr/bin/jaotc because associated file /usr/lib64/jvm/temurin-17-jdk/bin/jaotc (of link group javac) doesn't exist
update-alternatives: warning: skip creation of /usr/bin/rmic because associated file /usr/lib64/jvm/temurin-17-jdk/bin/rmic (of link group javac) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/rmic.1 because associated file /usr/lib64/jvm/temurin-17-jdk/man/man1/rmic.1 (of link group javac) doesn't exist
a802edbeed04:/ # java -version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing)
Thanks for the 15.3 package!
Looking further into the issue, the update-alternatives: error: alternative jrunscript can't be slave of java: it is a slave of javac error is caused by a conflict between the alternatives configured by temurin-17-jdk and the openjdk packages provided by OpenSUSE (I have java-17-openjdk-17.0.1.0-2.1, java-17-openjdk-devel-17.0.1.0-2.1, and java-17-openjdk-headless-17.0.1.0-2.1), which had been installed as dependencies from other packages. I had to remove them using rpm --erase --nodeps for testing, as zypper remove produced tons of error messages. Installing temurin-17-jdk, after manually removing these three packages, made the error go away. Removing temurin, reinstalling the three packages, then reinstalling temurin, made the error reappear.
Hmm interesting, I wonder if we can define those java-x packages as conflicts to automatically wipe them as part of the temurin install
The Temurin rpm would have to provide whatever the java-17-openjdk* packages provide, which is quite a long list, probably distribution-dependent, and possibly against the spirit of packaging java, which seems to allow the concurrent installation of various versions/implementations.
Stupid suggestion: could you adapt their spec file to Temurin? This would help create the required conflict and/or create compatible java and javac alternatives. The source RPM is here.
Meanwhile, yesterday I installed temurin-18-jdk-18.0.0.0.0.36-1.x86_64.rpm, and I had to update the java and javac alternatives by hand, as I got the update-alternatives: error: alternative jrunscript can't be slave of java: it is a slave of javac error again.
This looks like a discrepancy in Temurin. JEP https://openjdk.java.net/jeps/8278252 lists the two groups for java and javac where jrunscript is under javac
Upstream Fedora also links jrunscript to javac: https://src.fedoraproject.org/rpms/java-17-openjdk/blob/rawhide/f/java-17-openjdk.spec#_641
Temurin currently links it to java: https://github.com/adoptium/installer/blob/master/linux/jdk/suse/src/main/packaging/temurin/17/temurin-17-jdk.spec#L184
@jiekang would you be happy to submit a pull request to fix this?
@jiekang would you be happy to submit a pull request to fix this?
Yes, I'll work on a PR.