-3

I am trying to install Java 8 in Ubuntu but I am failing to do it. I tried the following commands to install it:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

After completion of this, I triggered the command javac -version.

This is the error log which i got

halfer
  • 19,824
  • 17
  • 99
  • 186
Manoj Kumar
  • 19
  • 1
  • 8
  • Tried to figure out the problem with the command: sudo dpkg --aduit | more. Ubuntu hinted out: For the first time it was partially configured. So i removed the listed items and again i tried installing it but still the same problem persists. – Manoj Kumar Jan 21 '18 at 16:17

1 Answers1

1

According to this thread , there was a problem on WebUpd8's side. This link here will give you the commands as a temporary solution.

If the problem still persits, you can download it manually. Download link is here, and the instructions are here.

Rohan Pillai
  • 917
  • 3
  • 17
  • 26
  • Installed successfully!! – Manoj Kumar Jan 21 '18 at 17:00
  • I have extracted in the /opt directory. And installation is also successful. And to check the version just i wrote: javac -version and java -version and it worked. Additionally i used: update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100 along with update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100. But when i typed echo $JAVA_HOME it's \showing nothing. – Manoj Kumar Jan 21 '18 at 17:03
  • This query has already been answered [here](https://stackoverflow.com/questions/35752497/echo-java-home-returns-nothing). If this answer or any other one solved your issue, please mark it as accepted. – Rohan Pillai Jan 21 '18 at 17:08
  • Thanks i got the solution. (Accepted) – Manoj Kumar Jan 21 '18 at 17:13