升級發行版時出現 dpkg 錯誤

升級發行版時出現 dpkg 錯誤

輸入 apt-get Upgrade 後輸出以下內容。

Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  manpages
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/795 kB of archives.
After this operation, 284 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 24372 files and directories currently installed.)
Preparing to replace manpages 3.27-1 (using .../manpages_3.44-1_all.deb) ...
Unpacking replacement manpages ...
dpkg: error processing /var/cache/apt/archives/manpages_3.44-1_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/getent.1.gz', which is also in package libc-bin 2.15-0ubuntu10.11
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/manpages_3.44-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我正在嘗試從擠壓升級到喘息,我認為我成功了,除了升級會導致此錯誤。可能是什麼問題呢?

答案1

看起來您以不應該的方式弄亂了系統包源,現在事情處於非常不一致的狀態。

雖然可能需要做很多工作才能從中恢復,但您永遠無法確定係統的持續穩定性。因此,只需安裝一個新的作業系統並在那裡恢復您的應用程式和資料。

答案2

看起來您(或以前的系統管理員)混合了 ubuntu 中的一些軟體包,並且與您在升級過程中安裝的軟體包存在文件衝突。

您可以使用以下命令覆蓋該錯誤。

dpkg -i --force-overwrite /var/cache/apt/archives/manpages_3.44-1_all.deb

這通常是相當安全的事情。特別是對於像手冊頁這樣不重要的東西。

答案3

這修復了它:

aptitude remove libc-bin

導致這種情況發生:

     Keep the following packages at their current version:
1)     libc-bin [2.15-0ubuntu10.11 (now)]

     Downgrade the following packages:
1)     libc-bin [2.15-0ubuntu10.11 (now) -> 2.13-38+deb7u8 (oldstable)]
2)     libc6 [2.15-0ubuntu10.11 (now) -> 2.13-38+deb7u8 (oldstable)]
3)     libc6-i386 [2.15-0ubuntu10.11 (now) -> 2.13-38+deb7u8 (oldstable)]
4)     libxi6 [2:1.7.1.901-1ubuntu1~precise3 (now) -> 2:1.6.1-1+deb7u1 (oldstabl
5)     patch [2.6.1-3ubuntu0.1 (now) -> 2.6.1-3 (oldstable)]

現在一切都已修復,我可以進行備份並重新安裝作業系統

相關內容