Java 安装到一半后无法安装软件或更新系统

Java 安装到一半后无法安装软件或更新系统

请帮助解决“oracle-java7-installer”缺失的问题。错误如下

dpkg: warning: files list file for package !['oracle-java7-installer' missing;][1] 
assuming package has no files currently installed (Reading database ... 302933 files and directories currently installed.) Removing linux-image-extra-3.8.0-19-generic ... /var/lib/dpkg/info/linux-image-extra-3.8.0-19-generic.postrm: 6: /var/lib/dpkg/info/linux-image-extra-3.8.0-19-generic.postrm: Syntax error: ")" 
unexpected dpkg: error processing linux-image-extra-3.8.0-19-generic (--remove):  subprocess installed post-removal script returned error exit status 2 
Errors were encountered while processing:  linux-image-extra-3.8.0-19-generic 
E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install.  Trying to recover:

答案1

感谢 Projjol 提供解决方案。

他说,

您有一个未正确安装或损坏的软件包。您必须删除 linux-image-extra-3.8.0-19-generic。

我建议您使用以下代码:gksudo nautilus /var/lib/dpkg/info现在查找所有以名称开头的文件linux-headers-3.8.0-19并删除它们。然后:

sudo apt-get -f install

sudo apt-get update

sudo apt-get dist-upgrade

sudo apt-get install linux

那么您的系统就能够正常工作了。

相关内容