Oracle java in Silverblue 29

Hi!

Have anyone successfully installed Oracle Java in Silverblue 29?

This is what I’m getting:

$ rpm-ostree install jre-8u181-linux-x64.rpm 
Checking out tree 675df77... done
Inactive requests:
  java (already provided by jre1.8-1.8.0_181-fcs.x86_64)
  jre (already provided by jre1.8-1.8.0_181-fcs.x86_64)
Enabled rpm-md repositories: updates fedora updates-testing
Updating metadata for 'updates': [=============] 100%
rpm-md repo 'updates'; generated: 2018-02-20 19:18:14
Updating metadata for 'fedora': [=============] 100%
rpm-md repo 'fedora'; generated: 2018-09-12 09:48:07
Updating metadata for 'updates-testing': [=============] 100%
rpm-md repo 'updates-testing'; generated: 2018-09-14 19:56:10
Importing metadata [=============] 100%
Resolving dependencies... failed
error: Could not depsolve transaction; 1 problem detected:
0. nothing provides /bin/basename needed by jre1.8-1.8.0_181-fcs.x86_64

$ whereis basename
basename: /usr/bin/basename /usr/share/man/man1/basename.1.gz /usr/share/man/man3/basename.3.gz /usr/share/man/man3p/basename.3p.gz /usr/share/man/man1p/basename.1p.gz

Hello,
I a going to be doing that very thing over this weekend. I have changed over to Silverblue from standard Fedora Workstation, due to the promise of easier development through the flatpak/container model. So far I am not at the point of installing Java, which I assume has to be layered if I want it available to any faltpak. I gave up, temporarily on trying to get Evolution installed as a flatpak, since currently faltpak-builder will not install into the ostree (I am using F28). As I get to the install, I’ll have more info that I can share about using Oracles JDK 8 and 10 on Silverblue. From the info up top it appears that Oracle installer is pointing to the wrong location for basename perhaps. You could try to modify their install script.

This is saying that nothing provides /bin/basename. As you have pointed out in fedora it is located at /usr/bin/basename. Unfortunately the RPM provided by Oracle on the Java site doesn’t account for this.

Would openJDK suffice? you could try rpm-ostree install java-1.8.0-openjdk in that case.

Unfortunately I really need Oracles JRE, some features used by SAP products does not work on openJDK.

There is a basename at /bin:

$ ls -l /bin/basename
-rwxr-xr-x. 4 root root 49352 dez 31 1969 /bin/basename

Because /bin is a link to /usr/bin. I would try to do that installation in a Centos container, as I suspect the rpm target Centos.

Installing things on the host won’t (usually) change what appears in flatpaks - both flatpak
and Docker/OCI containers have their own “base image” model that’s completely
separate from the host. Though flatpak does have extension points.

If you need the JRE for non-graphical applications (e.g. you’re developing a
Kubernetes app using Kotlin or something), then you want the JRE from a base
image.

Hello,

Thank you for the clarification.

My solution was unzip the binaries and add the dir in $PATH.

This is working for now.

This is most likely related to coreutils-8.29-5+ removing the Provides for /bin/* and Oracle hasn’t updated their RPMs to look at /usr/bin/ instead.

https://koji.fedoraproject.org/koji/buildinfo?buildID=1104553

* Mon Feb 26 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 8.29-5
- Remove /bin/* Provides
1 Like

Yeah,

That was my solution too.

Hi
Could you give a better description of the steps you took to do this please?

Hi!

I did this:

I’ve modified ~/.bashrc like this:

PATH=/home/user/java/jdk1.8.0/bin:$PATH
export PATH