apt-get error:子进程/ usr/bin/dpkg返回错误代码(1)

use*_*068 5 linux ubuntu apt-get

我在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).
Run Code Online (Sandbox Code Playgroud)

我尝试了几个命令: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).
Run Code Online (Sandbox Code Playgroud)

在apt-get -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
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)
Run Code Online (Sandbox Code Playgroud)

orv*_*rvi 12

尝试这个。打开一个新终端并粘贴它

sudo dpkg -i --force-overwrite  /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
Run Code Online (Sandbox Code Playgroud)

之后类型:

sudo apt-get autoremove
Run Code Online (Sandbox Code Playgroud)

最后输入

sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

希望你的问题能得到解决。


小智 9

解决方案是:

rm /var/lib/dpkg/info/$nomdupaquet* -f
Run Code Online (Sandbox Code Playgroud)

谢谢 :)


Ewa*_*lor 0

看起来您已经安装libc6-dev-amd64并且正在尝试安装依赖于 的软件包libc6-dev-i386,并且这两个软件包存在冲突(它们都包含/usr/include/bits)。

我的猜测是您不希望同时安装这两个。我会用来apt-get remove libc6-dev-amd64让自己恢复到良好的状态,然后再次尝试安装您想要的软件包。

如果这两个软件包在同时安装时可以正常工作,那么请向软件包维护者提交错误,因为他们需要修复这些软件包以允许这样做。