无法使用 apt 安装任何软件包

无法使用 apt 安装任何软件包

看来我的 Ubuntu(Ubuntu 10.04.4 LTS,lucid)上的一些软件包坏了,导致我无法安装任何新软件包。我在这个网站上也遇到过类似的问题,但都无济于事。以下是我尝试过的一些命令以及输出:

'sudo apt-get install -f' OR 'sudo apt-get --fix-broken install':


Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
6 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up gcalctool (5.30.0.is.5.28.2-0ubuntu3) ...


dpkg: error processing gcalctool (--configure):


 subprocess installed post-installation script returned error exit status 245

Setting up shared-mime-info (0.71-1ubuntu2) ...

Segmentation fault

dpkg: error processing shared-mime-info (--configure):

 subprocess installed post-installation script returned error exit status 139

Setting up update-manager (1:0.134.12.1) ...

dpkg: error processing update-manager (--configure):

 subprocess installed post-installation script returned error exit status 245

Setting up vino (2.28.2-0ubuntu2.2) ...

dpkg: error processing vino (--configure):

 subprocess installed post-installation script returned error exit status 245


No apport report written because MaxReports is reached already
Setting up libgweather-common (2.30.0-0ubuntu1.1) ...

dpkg: error processing libgweather-common (--configure):

 subprocess installed post-installation script returned error exit status 245

No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of libgweather1:

 libgweather1 depends on libgweather-common (>= 2.24.0); however:

  Package libgweather-common is not configured yet.

dpkg: error processing libgweather1 (--configure):

 dependency problems - leaving unconfigured

No apport report written because MaxReports is reached already
Processing triggers for menu ...

Errors were encountered while processing:

 gcalctool

 shared-mime-info

 update-manager

 vino

 libgweather-common

 libgweather1

E: Sub-process /usr/bin/dpkg returned an error code (1)


* 'sudo dkpg --configure -a':
Setting up shared-mime-info (0.71-1ubuntu2) ...

Segmentation fault

dpkg: error processing shared-mime-info (--configure):

 subprocess installed post-installation script returned error exit status 139

Setting up gcalctool (5.30.0.is.5.28.2-0ubuntu3) ...

dpkg: error processing gcalctool (--configure):

 subprocess installed post-installation script returned error exit status 245

Setting up libgweather-common (2.30.0-0ubuntu1.1) ...

dpkg: error processing libgweather-common (--configure):

 subprocess installed post-installation script returned error exit status 245

Setting up vino (2.28.2-0ubuntu2.2) ...

dpkg: error processing vino (--configure):

 subprocess installed post-installation script returned error exit status 245

Setting up update-manager (1:0.134.12.1) ...

dpkg: error processing update-manager (--configure):

 subprocess installed post-installation script returned error exit status 245

dpkg: dependency problems prevent configuration of libgweather1:

 libgweather1 depends on libgweather-common (>= 2.24.0); however:

  Package libgweather-common is not configured yet.

dpkg: error processing libgweather1 (--configure):

 dependency problems - leaving unconfigured

Processing triggers for menu ...

Errors were encountered while processing:

 shared-mime-info

 gcalctool

 libgweather-common

 vino

 update-manager

 libgweather1

希望有人能帮助我,提前谢谢!

[编辑]:我最终通过重新安装系统解决了这个问题。事实上,我不需要重新安装,只需重新配对系统,所有数据都保留完好。

答案1

作为最后的手段,我会去 Synaptic 包管理器并尝试它的“修复损坏的软件包“菜单项编辑菜单。如果失败,我将在同一个程序中检查所有损坏的软件包并删除它们(如果在 synaptic 中失败,只需在终端中执行sudo apt-get remove),然后我执行sudo apt-get autoremoveudo apt-get autoclean

在尝试安装它们之前你需要运行sudo apt-get update

顺便问一下,你上次尝试安装的导致问题出现的软件包是什么?这很重要,应该成为你问题的一部分!

相关内容