为什么安装wine会卸载其他软件包?

分享于 

15分钟阅读

ubuntu

  繁體

问题:

我正在尝试在Ubuntu 20.04上安装Wine。但它显示会删除apache,Blender和其他东西,


$ sudo apt-get install wine64


Reading package lists... Done


Building dependency tree 


Reading state information... Done


The following packages were automatically installed and are no longer required:


 apache2-data apache2-utils blender-data libaprutil1-dbd-sqlite3 libaprutil1-ldap libblosc1 libdcmtk14 libglew2.1 libjemalloc2 libopenimageio2.1 libopenvdb6.2


 libosdcpu3.4.0 libosdgpu3.4.0 libspnav0 libsquish0 php7.2-readline


Use 'sudo apt autoremove' to remove them.


The following additional packages will be installed:


 fonts-wine libcapi20-3 libfaudio0 libosmesa6 libstb0 libvkd3d1 libwine wine


Suggested packages:


 gstreamer1.0-plugins-bad q4wine winbind winetricks playonlinux wine-binfmt dosbox wine64-preloader


Recommended packages:


 wine32


The following packages will be REMOVED


 apache2 apache2-bin blender libapache2-mod-php7.2 php-fpm php-gd php7.2 php7.2-cli php7.2-fpm php7.3 php7.3-fpm php7.3-gd php7.4-fpm php7.4-gd silversearcher-ag


 whois


The following NEW packages will be installed


 fonts-wine libcapi20-3 libfaudio0 libosmesa6 libstb0 libvkd3d1 libwine wine wine64


0 to upgrade, 9 to newly install, 16 to remove and 4 not to upgrade.


Need to get 28.5 MB of archives.


After this operation, 122 MB of additional disk space will be used.


Do you want to continue? [Y/n] 




$ sudo apt-get autoremove


# ...


0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.



我尝试使用aptitude安装它:


$ sudo apt install aptitude


# ...


$ sudo aptitude install wine64


The following NEW packages will be installed:


 fonts-wine{a} glib-networking:i386{a} gstreamer1.0-plugins-base:i386{a} gstreamer1.0-plugins-good:i386{a} gstreamer1.0-x:i386{a} i965-va-driver:i386{a} 


 intel-media-va-driver:i386{a} libaa1:i386{a} libaom0:i386{a} libasn1-8-heimdal:i386{a} libasound2:i386{a} libasound2-plugins:i386{a} libasyncns0:i386{a} 


 libavahi-client3:i386{a} libavahi-common-data:i386{a} libavahi-common3:i386{a} libavc1394-0:i386{a} libavcodec58:i386{a} libavutil56:i386{a} libblkid1:i386{a} 


 libbrotli1:i386{a} libbz2-1.0:i386{a} libcaca0:i386{a} libcairo-gobject2:i386{a} libcairo2:i386{a} libcap2:i386{a} libcapi20-3{a} libcapi20-3:i386{a} 


 libcdparanoia0:i386{a} libcodec2-0.9:i386{a} libcom-err2:i386{a} libcups2:i386{a} libcurl3-gnutls:i386{a} libdatrie1:i386{a} libdb5.3:i386{a} 


 libdbus-1-3:i386{a} libdv4:i386{a} libexif12:i386{a} libfaudio0{a} libfaudio0:i386{a} libflac8:i386{a} libfontconfig1:i386{a} libfreetype6:i386{a} 


 libfribidi0:i386{a} libgcrypt20:i386{a} libgd3:i386{ab} libgdbm-compat4:i386{a} libgdbm6:i386{a} libgdk-pixbuf2.0-0:i386{a} libglib2.0-0:i386{a} 


 libglu1-mesa:i386{a} libgmp10:i386{a} libgnutls30:i386{a} libgomp1:i386{a} libgpg-error0:i386{a} libgphoto2-6:i386{a} libgphoto2-port12:i386{a} libgpm2:i386{a} 


 libgraphite2-3:i386{a} libgsm1:i386{a} libgssapi-krb5-2:i386{a} libgssapi3-heimdal:i386{a} libgstreamer-plugins-base1.0-0:i386{a} 


 libgstreamer-plugins-good1.0-0:i386{a} libgstreamer1.0-0:i386{a} libgudev-1.0-0:i386{a} libharfbuzz0b:i386{a} libhcrypto4-heimdal:i386{a} 


 libheimbase1-heimdal:i386{a} libheimntlm0-heimdal:i386{a} libhogweed5:i386{a} libhx509-5-heimdal:i386{a} libicu66:i386{a} libidn2-0:i386{ab} 


 libiec61883-0:i386{a} libieee1284-3:i386{a} libigdgmm11:i386{a} libjack-jackd2-0:i386{a} libjbig0:i386{a} libjpeg-turbo8:i386{a} libjpeg8:i386{a} 


 libk5crypto3:i386{a} libkeyutils1:i386{a} libkrb5-26-heimdal:i386{a} libkrb5-3:i386{a} libkrb5support0:i386{a} liblcms2-2:i386{a} libldap-2.4-2:i386{a} 


 libltdl7:i386{a} liblz4-1:i386{a} liblzma5:i386{a} libmount1:i386{a} libmp3lame0:i386{a} libmpg123-0:i386{a} libmysqlclient21:i386{a} libncurses6:i386{a} 


 libncursesw6:i386{a} libnettle7:i386{a} libnghttp2-14:i386{a} libnuma1:i386{a} libodbc1:i386{a} libogg0:i386{a} libopenal1:i386{a} libopenjp2-7:i386{a} 


 libopus0:i386{a} liborc-0.4-0:i386{a} libosmesa6{a} libosmesa6:i386{a} libp11-kit0:i386{a} libpango-1.0-0:i386{a} libpangocairo-1.0-0:i386{a} 


 libpangoft2-1.0-0:i386{a} libpcap0.8:i386{a} libpci3:i386{a} libpcre2-8-0:i386{ab} libpcre3:i386{ab} libperl5.30:i386{a} libpixman-1-0:i386{a} 


 libpng16-16:i386{a} libproxy1v5:i386{a} libpsl5:i386{a} libpulse0:i386{a} libraw1394-11:i386{a} libroken18-heimdal:i386{a} librsvg2-2:i386{a} 


 librsvg2-common:i386{a} librtmp1:i386{a} libsamplerate0:i386{a} libsane:i386{a} libsasl2-2:i386{a} libsasl2-modules:i386{a} libsasl2-modules-db:i386{a} 


 libsdl2-2.0-0:i386{a} libselinux1:i386{a} libshine3:i386{a} libshout3:i386{a} libslang2:i386{a} libsnappy1v5:i386{a} libsndfile1:i386{a} libsndio7.0:i386{a} 


 libsnmp35:i386{a} libsoup2.4-1:i386{a} libsoxr0:i386{a} libspeex1:i386{a} libsqlite3-0:i386{a} libssh-4:i386{a} libssl1.1:i386{a} libstb0{a} libstb0:i386{a} 


 libswresample3:i386{a} libsystemd0:i386{a} libtag1v5:i386{a} libtag1v5-vanilla:i386{a} libtasn1-6:i386{a} libthai0:i386{a} libtheora0:i386{a} libtiff5:i386{a} 


 libtwolame0:i386{a} libudev1:i386{a} libunistring2:i386{a} libusb-1.0-0:i386{a} libuuid1:i386{a} libv4l-0:i386{a} libv4lconvert0:i386{a} libva-drm2:i386{a} 


 libva-x11-2:i386{a} libva2:i386{a} libvdpau1:i386{a} libvisual-0.4-0:i386{a} libvkd3d1{a} libvkd3d1:i386{a} libvorbis0a:i386{a} libvorbisenc2:i386{a} 


 libvpx6:i386{a} libwavpack1:i386{a} libwayland-cursor0:i386{a} libwayland-egl1:i386{a} libwebp6:i386{a} libwebpmux3:i386{a} libwind0-heimdal:i386{a} libwine{a} 


 libwine:i386{a} libwrap0:i386{a} libx264-155:i386{a} libx265-179:i386{a} libxcb-render0:i386{a} libxcb-shm0:i386{a} libxcb-xfixes0:i386{a} 


 libxcomposite1:i386{a} libxcursor1:i386{a} libxi6:i386{a} libxinerama1:i386{a} libxkbcommon0:i386{a} libxml2:i386{a} libxpm4:i386{a} libxrandr2:i386{a} 


 libxrender1:i386{a} libxslt1.1:i386{a} libxss1:i386{a} libxv1:i386{a} libxvidcore4:i386{a} libzvbi0:i386{a} mesa-va-drivers:i386{a} mesa-vdpau-drivers:i386{a} 


 ocl-icd-libopencl1:i386{a} va-driver-all:i386{a} vdpau-driver-all:i386{a} wine{a} wine32:i386{a} wine64 


0 packages upgraded, 210 newly installed, 0 to remove and 0 not upgraded.


Need to get 129 MB of archives. After unpacking 806 MB will be used.


The following packages have unmet dependencies:


 libgd3 : Breaks: libgd3:i386 (!= 2.2.5-5.2+ubuntu18.04.1+deb.sury.org+1) but 2.2.5-5.2ubuntu2 is to be installed


 libgd3:i386 : Breaks: libgd3 (!= 2.2.5-5.2ubuntu2) but 2.2.5-5.2+ubuntu18.04.1+deb.sury.org+1 is installed


 libpcre3 : Breaks: libpcre3:i386 (!= 2:8.43-1+ubuntu18.04.1+deb.sury.org+1) but 2:8.39-12build1 is to be installed


 libpcre3:i386 : Breaks: libpcre3 (!= 2:8.39-12build1) but 2:8.43-1+ubuntu18.04.1+deb.sury.org+1 is installed


 libpcre2-8-0 : Breaks: libpcre2-8-0:i386 (!= 10.34-7+ubuntu18.04.1+deb.sury.org+1) but 10.34-7 is to be installed


 libpcre2-8-0:i386 : Breaks: libpcre2-8-0 (!= 10.34-7) but 10.34-7+ubuntu18.04.1+deb.sury.org+1 is installed


 libidn2-0 : Breaks: libidn2-0:i386 (!= 2.3.0-1+ubuntu18.04.1+deb.sury.org+1) but 2.2.0-2 is to be installed


 libidn2-0:i386 : Breaks: libidn2-0 (!= 2.2.0-2) but 2.3.0-1+ubuntu18.04.1+deb.sury.org+1 is installed


The following actions will resolve these dependencies:



 Keep the following packages at their current version: 


1) glib-networking:i386 [Not Installed] 


2) gstreamer1.0-plugins-base:i386 [Not Installed] 


3) gstreamer1.0-plugins-good:i386 [Not Installed] 


4) gstreamer1.0-x:i386 [Not Installed] 


5) libavcodec58:i386 [Not Installed] 


6) libcairo-gobject2:i386 [Not Installed] 


7) libcups2:i386 [Not Installed] 


8) libcurl3-gnutls:i386 [Not Installed] 


9) libfaudio0:i386 [Not Installed] 


10) libgd3:i386 [Not Installed] 


11) libgdk-pixbuf2.0-0:i386 [Not Installed] 


12) libglib2.0-0:i386 [Not Installed] 


13) libgnutls30:i386 [Not Installed] 


14) libgphoto2-6:i386 [Not Installed] 


15) libgstreamer-plugins-base1.0-0:i386 [Not Installed] 


16) libgstreamer-plugins-good1.0-0:i386 [Not Installed] 


17) libgstreamer1.0-0:i386 [Not Installed] 


18) libgudev-1.0-0:i386 [Not Installed] 


19) libharfbuzz0b:i386 [Not Installed] 


20) libidn2-0:i386 [Not Installed] 


21) libldap-2.4-2:i386 [Not Installed] 


22) libmount1:i386 [Not Installed] 


23) libpango-1.0-0:i386 [Not Installed] 


24) libpangocairo-1.0-0:i386 [Not Installed] 


25) libpangoft2-1.0-0:i386 [Not Installed] 


26) libpcre2-8-0:i386 [Not Installed] 


27) libpcre3:i386 [Not Installed] 


28) libpsl5:i386 [Not Installed] 


29) librsvg2-2:i386 [Not Installed] 


30) librsvg2-common:i386 [Not Installed] 


31) librtmp1:i386 [Not Installed] 


32) libsane:i386 [Not Installed] 


33) libselinux1:i386 [Not Installed] 


34) libsoup2.4-1:i386 [Not Installed] 


35) libwine:i386 [Not Installed] 


36) wine32:i386 [Not Installed] 



 Leave the following dependencies unresolved: 


37) libgstreamer-plugins-base1.0-0:i386 recommends gstreamer1.0-plugins-base:i386


38) wine64 recommends wine32 (= 5.0-3ubuntu1) 



Accept this solution? [Y/n/q/?] 



以下是命令的输出:


$ apt-cache policy "libpcre2-8-0:i386"


libpcre2-8-0:i386:


 Installed: (none)


 Candidate: 10.34-7


 Version table:


 10.34-7 500


 500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages


$ apt-cache policy libpcre2-8-0


libpcre2-8-0:


 Installed: 10.34-7+ubuntu18.04.1+deb.sury.org+1


 Candidate: 10.34-7+ubuntu18.04.1+deb.sury.org+1


 Version table:


 *** 10.34-7+ubuntu18.04.1+deb.sury.org+1 100


 100 /var/lib/dpkg/status


 10.34-7 500


 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages




答案1:

这实际上不是Wine卸载其他软件包,而是apt在清除不需要的依赖项。

可以通过运行sudo apt autoremove来测试它,它应该列出所有相同的包,然后删除它们。


答案2:

安装aptitude后,运行sudo aptitude install wine64

这给了我更有用的错误消息,问题出在libpcre3包(特别是版本号)的依赖关系需求冲突 2:8.43-1+ubuntu18.04.1+deb.sury.org+1

我使用apt-cache policy libpcre2-8-0检查包的源代码

显示了这个输出:


$ apt-cache policy libpcre2-8-0


libpcre2-8-0:


 Installed: 10.34-7+ubuntu18.04.1+deb.sury.org+1


 Candidate: 10.34-7+ubuntu18.04.1+deb.sury.org+1


 Version table:


 *** 10.34-7+ubuntu18.04.1+deb.sury.org+1 100


 100 /var/lib/dpkg/status


 10.34-7 500


 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages



这表明安装版本是deb.sury.org版本,高版本号的版本是deb.sury.org版本,但是还有另一个版本。

我决定从存储库中删除所有包,并重新安装Ubuntu存储库版本。

删除第三方存储库

如果第三方存储库尚未删除,我将使用工具"Software & Updates删除它"

列出从deb.sury.org安装的所有软件包

我通过运行以下命令从存储库创建了所有软件包的列表:


apt list --installed | grep sury



从deb.sury.org卸载或重新安装软件包

对于该列表中的每个包,我尝试卸载该包:


sudo apt uninstall PACKAGENAME



我从Ubuntu存储库中找到正确的版本号:


$ apt-cache madison libidn2-0


 libidn2-0 | 2.2.0-2 | http://archive.ubuntu.com/ubuntu focal/main amd64 Packages



然后,我将使用该版本号重新安装它:


$ sudo apt install --reinstall libidn2-0=2.2.0-2


The following packages will be DOWNGRADED:


 libidn2-0


# ...





PAC  PACK  installing  卸载  APT  WINE  
相关文章