Sunday, March 8, 2020

Oracle JDK 8 on Fedora 31

The issue was
> dnf install  /tmp/jdk-11.0.6_linux-x64_bin.rpm
Last metadata expiration check: 0:24:25 ago on Sun 08 Mar 2020 11:43:22 PM EDT.
Error:
 Problem: conflicting requests
  - nothing provides /bin/basename needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/cp needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/ls needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/mkdir needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/mv needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/pwd needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/sort needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
(try to add '--skip-broken' to skip uninstallable packages)


And here is how it worked

> rpm -Uvh --nodeps /tmp/jdk-8u241-linux-x64.rpm
warning: /tmp/jdk-8u241-linux-x64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:jdk1.8-2000:1.8.0_241-fcs        ################################# [100%]
Unpacking JAR files...
        tools.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
        rt.jar...
        jsse.jar...
        charsets.jar...
        localedata.jar...

> alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
 + 1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.6.10-0.fc31.x86_64/bin/java)
*  2           /usr/java/jdk1.8.0_241-amd64/jre/bin/java

Enter to keep the current selection[+], or type selection number: 2

> java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)

No comments:

Post a Comment