apt --fix-broken install 不起作用,安装 wine-stable 后包管理器损坏

apt --fix-broken install 不起作用,安装 wine-stable 后包管理器损坏

我在 ubuntu 18.04 上。我尝试安装 wine-stable,但出现错误。现在我无法再安装或删除任何东西了。

我怎样才能解决这个问题?

martin@D002-0113:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libatkmm-1.6-1v5 libcairomm-1.0-1v5 libgmp-dev libgmpxx4ldbl libgtkmm-3.0-1v5 libnih-dbus1
  libpangomm-1.4-1v5 libpcre16-3 libtbb2 python-apt python-pycurl
Use 'sudo apt autoremove' to remove them.
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 0 not upgraded.
3 not fully installed or removed.
Need to get 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
Get:1 http://nl.archive.ubuntu.com/ubuntu bionic/universe amd64 libwine amd64 3.0-1ubuntu1 [20,2 MB]
Get:2 http://nl.archive.ubuntu.com/ubuntu bionic/universe i386 libwine i386 3.0-1ubuntu1 [19,5 MB]
Get:3 http://nl.archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-wine all 3.0-1ubuntu1 [146 kB]
Fetched 39,9 MB in 4s (11,3 MB/s)  
(Reading database ... 258482 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)

更多信息:

sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of wine32:i386:
 wine32:i386 depends on libwine (= 3.0-1ubuntu1); however:
  Package libwine:i386 is not installed.

dpkg: error processing package wine32:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of wine64:
 wine64 depends on libwine (= 3.0-1ubuntu1); however:
  Package libwine:amd64 is not installed.

dpkg: error processing package wine64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of wine-stable:
 wine-stable depends on wine64 (>= 3.0-1ubuntu1) | wine32 (>= 3.0-1ubuntu1); however:
  Package wine64 is not configured yet.
  Package wine32:i386 is not configured yet.
 wine-stable depends on wine64 (<< 3.0-1ubuntu1.1~) | wine32 (<< 3.0-1ubuntu1.1~); however:
  Package wine64 is not configured yet.
  Package wine32:i386 is not configured yet.

dpkg: error processing package wine-stable (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 wine32:i386
 wine64
 wine-stable

还尝试过:

sudo dpkg -P wine1.8
dpkg: dependency problems prevent removal of wine1.8:
 wine1.8-i386:i386 depends on wine1.8:any (= 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1).
 wine1.8-amd64 depends on wine1.8:any (= 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1).
 winetricks depends on wine; however:
  Package wine is not installed.
  Package wine1.6 which provides wine is not installed.
  Package wine1.8 which provides wine is to be removed.
  Package wine-stable which provides wine is not configured yet.

dpkg: error processing package wine1.8 (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 wine1.8
martin@D002-0113:~$ sudo dpkg -P wine1.8-amd64 
dpkg: dependency problems prevent removal of wine1.8-amd64:
 wine1.8 depends on wine1.8-amd64 (= 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1).

dpkg: error processing package wine1.8-amd64 (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 wine1.8-amd64

答案1

我修复了它:

sudo dpkg --force depends -P wine1.8-i386
sudo dpkg --force depends -P wine1.8
sudo dpkg --force depends -P wine1.8-amd64

然后 sudo apt --fix-broken install

相关内容