2

I am trying to build model of apollo/apolloauto which throws this error.

I have already followed Oracle-Java8-Installer: No installation candidate

and also sudo apt-get install oracle-java8-installer which gives

$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java8-installer is already the newest version (8u131-1~webupd8~2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

oracle-java8-installer is already installed then also it throws error 'oracle-java8-installer' has no installation candidate

Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'oracle-java8-installer' has no installation candidate
The command '/bin/sh -c bash /tmp/installers/install_bazel.sh' returned a non-zero code: 100
Kulfy
  • 18,154

1 Answers1

2

If you're using a newer version of Ubuntu it's because Java 8 has been replaced by a newer version. In 19.04 it's version 11. You should be able to install your release's default Java version with:

sudo apt install default-jre

I ran into a similar issue when trying to install the Minecraft deb package; it specifically looked for the version 8 of Java instead of just a Java executable with a minimum version number, so it refused to install. However, installing my default-jre brought in version 11, which works just fine with the tarball version of Minecraft that simply has a binary executable in it.

Gerowen
  • 1,468