linux - 易于获取错误 : Sub-process/usr/bin/dpkg returned an error code (1)

标签 linux ubuntu apt-get

我在 apt-get 安装时出错 这是一个错误:

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 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>

关于linux - 易于获取错误 : Sub-process/usr/bin/dpkg returned an error code (1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30677470/

相关文章:

php - 使用外部 IP 访问 Linux vps 中的文件的最佳和最简单的方法是什么?

linux - 子进程是否复制整个数组?

php - 错误 2002 (HY000) : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Ubuntu

linux - 错误 ubuntu apt-get 更新

ubuntu - 如何使用命令行为 ubuntu 安装 ffmpeg?

c++ - C++目标文件和程序文件 union 编译的Bashrc别名

linux - 无法从 Windows 连接到 Redis Linux 服务器

linux - Ubuntu 20.04 - VPN 连接失败 - 找不到源连接

c++ - 从新的和不同的发行版加载 LD_PRELOAD libstdc++.so.6 和 libc.so.6 时出现浮点异常

ubuntu-14.04 - 出现错误 Ubuntu 14.04 Unmet dependency。尝试 'apt-get -f install' 不带包