Manjunath H M
Manjunath H M

Reputation: 928

Getting Error while installing java8 on ubuntu 16.04

I tried to install java 8 on ubuntu 16.04. The steps followed are :

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

while running sudo apt install oracle-java8-installer I got the below error.

dpkg: error processing package unattended-upgrades (--configure):
 subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 openjdk-8-jre-headless:amd64
 locales
 oracle-java8-installer
 linux-image-4.4.0-78-generic
 linux-image-extra-4.4.0-78-generic
 linux-image-generic
 linux-generic
 openjdk-8-jre:amd64
 postgresql-common
 postgresql-9.6
 postgresql-contrib-9.6
 postgresql-contrib
 sysstat
 tomcat8
 unattended-upgrades
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please suggest me how to overcome by this error on Ubuntu and suggest the steps to install oracle-java8.

Upvotes: 0

Views: 920

Answers (1)

Mohan
Mohan

Reputation: 1244

Open Terminal -> and do the following steps sequentially:

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

and finally type:java -version. This command will show you whether jdk installed in your Ubuntu or not.

Upvotes: 1

Related Questions