I wanted to download Minecraft on Linux so I downloaded Java 7, because anything over Java 7 says

Could not find

so I installed Java 7, but when I try to update Java by entering:

sudo add-apt-repository ppa:webupd8team/java

it doesn't work. Neither does

sudo apt update; sudo apt install oracle-java8-installer

Do I need to install something else for Java to work?
I can't add any PPA'S at all, no matter what!

Please help!

  • Why can't you add any PPAs? It should work if they have contents for your hardware architecture. If not then obviously adding them does nothing. But why do you think you need a PPA for Java? I think you should install OpenJDK? – GabrielaGarcia Oct 17 '18 at 16:30

I found out yesterday that 'webupd8team' is a private repository, managed by one guy. Exactly one year ago there was a similar problem, and that was a license issue as I understand.

I fixed it with an answer provided here -> https://ubuntuforums.org/showthread.php?t=2374686

cd /var/lib/dpkg/info && sudo sed -i 's|JAVA_VERSION=8u181|JAVA_VERSION=8u191|' oracle-java8-installer.*

sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|' oracle-java8-installer.*

sudo sed -i 's|SHA256SUM_TGZ=.*|SHA256SUM_TGZ="53c29507e2405a7ffdbba627e6d64856089b094867479edc5ede4105c1da0d65"|' oracle-java8-installer.*

sudo sed -i 's|J_DIR=jdk1.8.0_181|J_DIR=jdk1.8.0_191|' oracle-java8-installer.*

And then finally:

sudo apt-get -y install oracle-java8-installer

Hope this helps you :)


I already fixed the error, I already had the latest java version by opening the Java.deb file with a package installer instead of installing java by terminal.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.