[英]Sub-process /usr/bin/dpkg returned an error code (1), apt-get error:
[英]apt-get error: Sub-process /usr/bin/dpkg returned an error code (1)
我在 apt-get install 中有錯誤,這是一個錯誤:
The following packages have unmet dependencies:
gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我嘗試了幾個命令,例如: apt-get -f install apt-get clean
我嘗試更改我的源列表,並重新制作 apt-get update
$ sudo apt-get install g++
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 going to be installed
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
在 apt-get -f 安裝
$ 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
The following NEW packages will be installed:
libc6-dev-i386
0 upgraded, 1 newly installed, 0 to remove and 434 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1.148 kB of archives.
After this operation, 6.333 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 194963 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.6) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb (--unpack):
trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64 2.19-0ubuntu6.6
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
卸載時也可能出現同樣的dpkg錯誤:
apt-get uninstall
和
apt-get purge
首先,卸載軟件包:
rm -f /var/lib/dpkg/info/<package-name>*
apt-get purge <package-name>
之后,您可以重新安裝它:
apt-get install <package-name>
嘗試這個。 打開一個新終端並粘貼它
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
在該類型之后:
sudo apt-get autoremove
最后輸入
sudo apt-get update
希望你的問題會得到解決。
從終端嘗試以下步驟:
sudo apt-get --purge remove libc6-dev-amd64
sudo apt-get -f install
sudo apt-get update
希望這會解決您的問題。
我能找到的所有解決方案都沒有為我解決問題......仍然是破損的包,無論是自動刪除, -f install
......等等。
玩了一會兒后,以下為我解決了這個問題:
sudo apt-get --purge remove libc6-dev-i386 libc6-dev-x32 gcc-5-multilib gcc-multilib
sudo apt autoremove -f
sudo apt-get -f install
嘗試是重新配置包數據庫。 可能是在安裝軟件包時數據庫損壞了。 sudo dpkg --configure -a
看起來您已經安裝了libc6-dev-amd64
並且您正在嘗試安裝依賴於libc6-dev-i386
軟件包,這兩者存在沖突(它們都包含/usr/include/bits )。
我的猜測是您不希望同時安裝這兩個。 我會使用apt-get remove libc6-dev-amd64
使自己恢復到良好狀態,然后再次嘗試安裝所需的軟件包。
如果這兩個包在同時安裝時要工作,那么向包維護者提交錯誤,因為他們需要修復包以允許這樣做。
當升級命令 ( sudo apt-get upgrade -y
) 在 Ubuntu 18.04.3(Linux 內核版本 5.7.14)中運行時,會報告以下錯誤(紅色):
... bind /var/run/spice-vdagentd/spice-vdagent-sock: No such file or directory
... Fatal could not create server socket /var/run/spice-vdagentd/spice-vdagent-sock
...
... Failed to start Agent daemon for Spice guests.
以下步驟解決了該問題:
spice-vdagentd
目錄不存在,請spice-vdagentd
它:> sudo mkdir /var/run/spice-vdagentd (if it does not exist)
spice-vdagent-sock
> sudo vi /var/run/spice-vdagentd/spice-vdagent-sock
:wq
upgrade
命令以驗證問題是否已修復。使用以下步驟我在“Oracle VM VirtualBox Manager”中解決了問題
易於自動刪除
apt 清除 libreoffice-base libreoffice-core
dpkg -l " libreoffice " | grep "^ii"
須藤 dpkg --configure -a
sudo apt-get install -f
現在您可以嘗試安裝 - pip3 install jupyter 等。
我找到了我的解決方案,因為下面引用的其他方法不起作用。 通常,它與已安裝的依賴項發生沖突。
我用這些命令解決了這個問題,用於重新創建空白配置(debian):
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_silent
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo apt-get -f install <xxxx>
您可以使用以下命令解決此問題:
sudo apt-get remove --purge libreoffice-core libreoffice-common
python3-uno libreoffice-*
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.