在我的 Ubuntu 18.04 LTS 上无法安装任何东西。当我运行
sudo apt-get upgrade
我得到:
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:
wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not installed
wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
当我跑步时
sudo apt --fix-broken install
过了一会儿我收到错误消息:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
fonts-wine libwine libwine:i386
The following NEW packages will be installed:
fonts-wine libwine libwine:i386
0 upgraded, 3 newly installed, 0 to remove and 10 not upgraded.
15 not fully installed or removed.
Need to get 0 B/39,9 MB of archives.
After this operation, 375 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 373690 files and directories currently installed.)
Preparing to unpack .../libwine_3.0-1ubuntu1_amd64.deb ...
Unpacking libwine:amd64 (3.0-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libwine_3.0-1ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/wine/acledit.dll.so', which is also in package wine1.8-amd64 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libwine_3.0-1ubuntu1_i386.deb ...
Unpacking libwine:i386 (3.0-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libwine_3.0-1ubuntu1_i386.deb (--unpack):
trying to overwrite '/usr/lib/i386-linux-gnu/wine/acledit.dll.so', which is also in package wine1.8-i386:i386 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../fonts-wine_3.0-1ubuntu1_all.deb ...
Unpacking fonts-wine (3.0-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/fonts-wine_3.0-1ubuntu1_all.deb (--unpack):
trying to overwrite '/usr/share/wine/fonts/coue1255.fon', which is also in package wine1.8 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libwine_3.0-1ubuntu1_amd64.deb
/var/cache/apt/archives/libwine_3.0-1ubuntu1_i386.deb
/var/cache/apt/archives/fonts-wine_3.0-1ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
那么关于葡萄酒的一些事情......
你有什么建议吗?
答案1
这似乎与以下问题类似这个。它引用了另一个包,但输出错误是一样的trying to overwrite file, which is also in…
此处的解决方案是直接使用 (强制)删除导致错误的软件包dpkg
。有问题的软件包在which is also in <package to be removed>
就你的情况而言wine1.8-amd64
,wine1.8-i386
wine1.8
以下命令应该可以解决问题:
sudo dpkg -P wine1.8
sudo dpkg -P wine1.8-amd64
sudo dpkg -P wine1.8-i386
然后再次运行
sudo apt-get install -f
现在应该dpkg
能够正确配置软件包了。
如果由于某种原因上述命令不起作用,请使用该--force-all
选项。这是一个危险的选择,因为它可能会破坏事物,但它的存在是有原因的。
sudo dpkg -P --force-all wine1.8
sudo dpkg -P --force-all wine1.8-amd64
sudo dpkg -P --force-all wine1.8-i386
另外,如果你还启用了有关 wine 的任何 PPA,请禁用它或者完全删除它。