Error installing oracle-java8-installer from webup8team ppa

Solution 1:

The following might work, it would delete any partials:

sudo rm /var/cache/oracle-jdk8-installer/jdk-*

Then finish the install with:

sudo apt-get install -f
sudo dpkg --configure -a

Solution 2:

I had this error occur during sudo apt-get upgrade behind a corporate proxy. To fix, I edited /etc/apt/apt.conf and added the following lines:

Acquire::http::Proxy "http://[<proxyUserName>:<proxyPass>@]<proxyUrl>:<proxyPort>"; Acquire::https::Proxy "http://[<proxyUserName>:<proxyPass>@]<proxyUrl>:<proxyPort>";

Where

  • [<proxyUserName>:<proxyPass>@] is your optional proxy authentication (don't include this if you don't authenticate)

  • <proxyUserName> is your proxy user name

  • <proxyPass> is your proxy password

  • <proxyUrl> is your proxy url

  • <proxyPort> is your proxy port

The oracle tarball is downloaded over https, so if you are behind a proxy apt needs an https proxy to execute it.

After editing, save the file, then open a new terminal. sudo apt-get update and install as needed.

Solution 3:

I had similar problems when my Ubuntu system couldn't download file from oracle server (file jdk-8u111-linux-x64.tar.gz). So I was have to download it from oracle site ( http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html ) and copy to folder /var/cache/oracle-jdk8-installer/ manually. This solved the problem and oracle-java8-installer became able to finish the installation.