I am trying install Oracle Java 8 on Ubuntu 18.04 LTS.
$ java --version
Command 'java' not found, but can be installed with:
sudo apt install default-jre
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless
According tutorial i added ppa:
sudo add-apt-repository ppa:webupd8team/java
and after that i updated my os:
$ sudo torsocks apt-get update
Hit:1 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
and then I ran:
sudo apt-get install oracle-java8-installer
But I got :
$ sudo torsocks apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
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
I found this solution but it is not working and I got same error