这些命令均成功运行
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
但是当我运行时sudo apt-get install oracle-java8-installer
,它会下载 JDK,但随后停止并显示以下错误:
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
打开终端并运行以下命令,
sudo rm -rf /var/lib/dpkg/info/\*.\*`
sudo apt-get clean`
sudo apt-get install -f`
sudo apt-get update`