每当我为任何软件包运行apt-get install时,我都会收到此错误
➜ ~ sudo apt-get install clang-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
gcc-7-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.25-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
当我运行sudo apt --fix-broken install时,我收到此错误
Unpacking libc6-dev-i386 (2.25-2) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.25-2_amd64.deb (--unpack):
trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64:i386 2.25-2
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.25-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案 0 :(得分:3)
我首先运行
修复了它sudo dpkg -r libc6-dev-i386
然后跑步 sudo apt-get install libc6-dev-i386。
答案 1 :(得分:1)
这通常是由于“未满足已安装软件包的依赖性”
打开终端并按以下顺序运行这些命令:
sudo apt-get update
sudo apt --fix-broken install
sudo dpkg --configure -a
sudo apt-get clean
答案 2 :(得分:0)
我尝试了以下
但问题仍然存在,因此此方法对我有用。 第一: 将/ etc / apt /文件夹移动到一个临时位置[您需要管理员权限(sudo)] 然后运行
删除自动生成的/ etc / apt /文件夹 然后我将先前的/ etc / apt /文件夹返回其原始位置 然后运行
答案 3 :(得分:0)
你必须这样做:
$ sudo apt purge libc6-dev-x32
然后添加 apt purge
在同一命令后显示的任何其他包,直到不再显示包。这对我有用。下面是一个例子:https://askubuntu.com/a/1312145/165324
答案 4 :(得分:0)
实际上命令 apt --fix-broken install
需要稍微修改一下,它会工作得很好。
以下对我有用:
sudo apt install --fix-broken