Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

安裝套件出現錯誤,如何修正

使用”apt-get install“安裝程序時遇到錯誤提示

使用如下命令修復安裝包(不過在我遇到的問題中沒有起作用) 

$ sudo apt-get --fix-broken install

或者使用命令

$ sudo dpkg --purge xxx

其中 xxx 為安裝失敗的程序,錯誤提示中會給出其名稱,不過也有可能是錯誤提示中未給出的,但之前安裝的確
出錯的程序。
==========================================================================

When I use the command

apt --fix-broken install


I get the following errors:

Reading package lists... Done


Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libhogweed4 : Depends: libnettle6 (= 3.3-1+b1) but 3.4-1 is installed
mana-toolkit : Depends: dnsmasq but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held
packages.
E: Unable to correct dependencies

------------------------------------------------------------------------
This is not a simple problem, and I faced a similar one just a minute ago. I solved
it by running (a variation on):

dpkg --force-all --configure -a


dpkg --purge --force-depends libnettle6 (cf. this post)
apt --fix-broken install
apt-get -f install

You might also like