I'm trying to install java 8 on cloud9 through the webupd8 PPA. So I'm adding the repository
sudo add-apt-repository ppa:webupd8team/java
Next I do the update and finally when I run the command
sudo apt-get install oracle-java8-installer
I get the error
E: Unable to locate package oracle-java8-installer
Any ideas how can I get through that and istall java 8 on cloud9?
AWS Cloud9 provides enhanced language support to improve your development experience when working with Java. Key productivity features include code completion, linting for errors, code lenses, and debugging options such as breakpoints and stepping.
As noted by christophetd, I completed the following steps and everything installed without issue:
$ sudo vim /etc/apt/sources.list
Add the following lines of code to the file:
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
$ sudo apt-get update
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get install oracle-java8-installer
$ java -version
java version "1.8.0_101"
Add the two following lines to your file /etc/apt/sources.list
(which you can create if it does not exist)
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
Then run sudo apt-get update
, and you should be able to install oracle-java8-installer
.
This basically does the add-apt-repository
manually. I suspect the issue is due to the fact that the default source files /etc/apt/sources.list.d/*
are mounted as read-only (see for instance this topic on Cloud9 community)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With