Synaptic 等公司给我这个错误:你的系统上有 1 个损坏的软件包。
我尝试使用修复损坏的软件包选项,但 Synaptic 直接崩溃了。看来 Firefox 17.0.1 是导致所有问题的软件包。
所以我尝试使用sudo apt-get -f install firefox
并收到这些错误
$ sudo apt-get -f install firefox
Reading package lists ... Done
Building dependency ratio
Reading state information ... Done
Suggested packages: latex-xft-fonts
The following packages will be upgraded: firefox
1 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
1 packages not fully installed or removed.
Must obtain 0 B/22.4 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 161323 files and directories currently installed.)
Preparing to replace firefox 17.0 + build2-0ubuntu0.11.10.1 (using ... / firefox_17.0.1 + build1-0ubuntu0.11.10.1_amd64.deb) ...
Unpacking replacement firefox ...
dpkg: error processing / var/cache/apt/archives/firefox_17.0.1 + build1-0ubuntu0.11.10.1_amd64.deb (- unpack):
trying to overwrite '/ usr / lib / firefox / extensions "that are also present in the package mint-search-addon 2011.08.15
Please restart all running instances of firefox, or you will experience problems.
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding / usr / share / applications / bamf.index ...
Processing triggers for gnome-menus ...
Errors occurred in the treatment of:
/ Var/cache/apt/archives/firefox_17.0.1 + build1-0ubuntu0.11.10.1_amd64.deb
E: Sub-process / usr / bin / dpkg returned an error code (1)
接下来我尝试使用
sudo apt-get install && sudo-apt get update reinstall firefox
sudo apt-get remove --purge firefox
sudo apt-get update
不幸的是,他们都无济于事。我也尝试重新安装突触,但也失败了。怎么了?
答案1
您的软件索引似乎已损坏。
尝试sudo apt-get install -f
并sudo apt-get autoremove
之后清理并更新 apt。
答案2
要解决Ubuntu上的破包问题,您需要清除它,这与PPA或软件源有关。有几种方法可以解决这个问题。请参阅本指南:
1。使用此命令进行清洁。
% sudo apt-get clean && sudo apt-get update
2。如果使用第一个命令失败,请尝试使用此命令:
% dpkg --configure -a
3。如果您无法使用第二个命令删除损坏的软件包,请尝试此命令:
% apt-get -f install
最后一个命令将帮助您删除所有损坏的包。