Linux

Apt-get 因依賴關係中斷而阻塞(libc6、Linux Mint)

  • February 21, 2015

目前,由於一些未解決的依賴關係,Apt-get 完全阻塞,當我執行升級時,我收到此錯誤:

sudo apt-get upgrade
Reading package lists... Done                                                                                                        
Building dependency tree                                                                                                             
Reading state information... Done                                                                                                    
You might want to run 'apt-get -f install' to correct these.                                                                         
The following packages have unmet dependencies:                                                                                      
gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not installed                                                        
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.5) but it is not installed                                                 
E: Unmet dependencies. Try using -f.      

如果我執行 -f install 選項,我會收到以下錯誤消息:

sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
 libc6-dev-i386
Recommended packages:
 gcc-multilib
The following NEW packages will be installed:
 libc6-dev-i386
0 upgraded, 1 newly installed, 0 to remove and 96 not upgraded.
27 not fully installed or removed.
Need to get 0 B/1,151 kB of archives.
After this operation, 6,337 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 190746 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.5) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb (--unpack):
trying to overwrite '/usr/include/gnu', which is also in package libc6-dev-amd64 2.19-0ubuntu6.5
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我不知道該怎麼做才能解決這個問題,由於這個錯誤,我什至無法刪除包。

是啊。依賴的樂趣,必要的邪惡。

您可能想嘗試使用dpkg而不是apt

在某些情況下,debian 軟體包不願意使用 gdebi 或軟體中心安裝$$ also apt & synaptic $$由於依賴問題。在這種情況下,您可以使用以下命令安裝 .deb 文件 dpkg –force-all -i PackageName

eg dpkg –force-all -i google-chrome-stable_current_i386.deb

參考:http: //linuxhalwa.blogspot.co .uk/2013/12/how-to-force-install-deb-package.html。

在您的情況下,dpkg –force-all -i libc6-dev-i386可能就可以解決問題。

引用自:https://unix.stackexchange.com/questions/186095