我试图在ubuntu 16.04上安装java 8。 接下来的步骤是:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt install oracle-java8-installer
在运行sudo apt install oracle-java8-installer
时出现以下错误。
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)
请建议我如何克服Ubuntu上的这个错误并建议安装oracle-java8的步骤。
答案 0 :(得分:0)
开放式终端 - >并按顺序执行以下步骤:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
最后输入:java -version
。
此命令将显示是否在您的Ubuntu中安装了jdk。