![Wine(wine32)需要依赖项,但 Ubuntu 20.04 不会安装这些依赖项](https://linux22.com/image/1178850/Wine%EF%BC%88wine32%EF%BC%89%E9%9C%80%E8%A6%81%E4%BE%9D%E8%B5%96%E9%A1%B9%EF%BC%8C%E4%BD%86%20Ubuntu%2020.04%20%E4%B8%8D%E4%BC%9A%E5%AE%89%E8%A3%85%E8%BF%99%E4%BA%9B%E4%BE%9D%E8%B5%96%E9%A1%B9.png)
因此,当我尝试安装时,wine
没有任何问题,但是它显然没有安装我想要运行的应用程序所需的 wine32。
我已经添加了sudo dpkg --add-architecture i386
但是当我尝试时sudo apt install wine32
出现这些错误:
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:
libavcodec58 : Breaks: libavcodec58:i386 (!= 7:4.2.4-1ubuntu0.1)
libavcodec58:i386 : Depends: libaom0:i386 (>= 1.0.0) but it is not going to be installed
Depends: libavutil56:i386 (= 7:4.3.1-5) but it is not going to be installed
Depends: libcairo2:i386 (>= 1.2.4) but it is not going to be installed
Depends: libcodec2-0.9:i386 (>= 0.9.2) but it is not going to be installed
Depends: libdav1d4:i386 (>= 0.2.1) but it is not installable
Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed
Depends: libgsm1:i386 (>= 1.0.18) but it is not going to be installed
Depends: libmp3lame0:i386 (>= 3.100) but it is not going to be installed
Depends: libopenjp2-7:i386 (>= 2.0.0) but it is not going to be installed
Depends: libopus0:i386 (>= 1.1) but it is not going to be installed
Depends: librsvg2-2:i386 (>= 2.14.4) but it is not going to be installed
Depends: libshine3:i386 (>= 3.1.0) but it is not going to be installed
Depends: libsnappy1v5:i386 (>= 1.1.8) but it is not going to be installed
Depends: libspeex1:i386 (>= 1.2~beta3-1) but it is not going to be installed
Depends: libswresample3:i386 (= 7:4.3.1-5) but it is not going to be installed
Depends: libtheora0:i386 (>= 1.0) but it is not going to be installed
Depends: libtwolame0:i386 (>= 0.3.10) but it is not going to be installed
Depends: libva2:i386 (>= 2.2.0) but it is not going to be installed
Depends: libvorbis0a:i386 (>= 1.1.2) but it is not going to be installed
Depends: libvorbisenc2:i386 (>= 1.1.2) but it is not going to be installed
Depends: libvpx6:i386 (>= 1.6.0) but it is not going to be installed
Depends: libwavpack1:i386 (>= 4.40.0) but it is not going to be installed
Depends: libwebp6:i386 (>= 0.5.1) but it is not going to be installed
Depends: libwebpmux3:i386 (>= 0.6.1-2+b1) but it is not going to be installed
Depends: libx264-160:i386 (>= 2:0.160.3011+gitcde9a93) but it is not installable
Depends: libx265-192:i386 (>= 3.2) but it is not installable
Depends: libxvidcore4:i386 (>= 1.2.2) but it is not going to be installed
Depends: libzvbi0:i386 (>= 0.2.35) but it is not going to be installed
Breaks: libavcodec58 (!= 7:4.3.1-5)
wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages
深入研究后发现,存在两个问题:
1)一些依赖关系相互“破坏”
2)Ubuntu 20.04 中没有提供该版本所需的许多依赖项
我能以某种方式强制 wine32 安装所需版本的依赖项吗?
旁注:从 Ubuntu 18.04 升级到 20.04 后,wine 出现故障,在 18.04 上,我以某种方式使用添加架构和 winehq 存储库使其正常工作......
编辑
存储库
当前已禁用(在我尝试调试时已启用)
https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/(常规和源)
当前已启用
https://dl.winehq.org/wine-builds/ubuntu/(常规和源)
输出apt-cache policy wine32
wine32:i386:
Installed: (none)
Candidate: 5.0-3ubuntu1
Version table:
5.0-3ubuntu1 500
500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
输出grep -ir ^deb /etc/apt/ --include=*.list
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu/ focal-security restricted universe multiverse main
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal-updates restricted universe multiverse main
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal-backports restricted universe multiverse main
/etc/apt/sources.list:deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
/etc/apt/sources.list:deb-src https://dl.winehq.org/wine-builds/ubuntu/ focal main
当我禁用所有这些存储库并清除所有 wine 并运行 autoremove 和 clean 和 autoclean 和 apt update 后,尝试的输出sudo apt install wine32
现在是:
The following packages have unmet dependencies:
wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
的输出apt-cache policy wine32
保持不变,但grep -ir ^deb /etc/apt/ --include=*.list
由于删除了 repos,输出有所减少。
编辑2:
apt-cache policy libwine:i386
libwine:i386:
Installed: (none)
Candidate: 5.0-3ubuntu1
Version table:
5.0-3ubuntu1 500
500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
dpkg -l | grep -i wine
=> 没有结果
sudo apt-get install libwine:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libwine:i386 : Depends: libfaudio0:i386 (>= 19.06.07) but it is not going to be installed
Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed
Depends: libgphoto2-6:i386 (>= 2.5.10) but it is not going to be installed
Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.0.0) but it is not going to be installed
Depends: libgstreamer1.0-0:i386 (>= 1.4.0) but it is not going to be installed
Depends: libxml2:i386 (>= 2.9.0) but it is not going to be installed
Recommends: libcups2:i386 (>= 1.4.0) but it is not going to be installed
Recommends: libgssapi-krb5-2:i386 (>= 1.6.dfsg.2) but it is not going to be installed
Recommends: libkrb5-3:i386 (>= 1.6.dfsg.2) but it is not going to be installed
Recommends: libsane:i386 (>= 1.0.24) but it is not going to be installed
Recommends: libxslt1.1:i386 (>= 1.1.25) but it is not going to be installed
Recommends: gstreamer1.0-plugins-good:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
答案1
该问题是由三个本地安装的与 PHP 相关的软件包引起的,它们来自deb.sury.org存储库。
因此修复方法如下:
sudo apt-get install libpcre2-8-0=10.34-7
sudo apt-get install libssl1.1=1.1.1f-1ubuntu2.1
sudo apt-get install libssl1.1:i386=1.1.1f-1ubuntu2.1
sudo aptitude install wine32
如果你想删除所有deb.sury.org软件包 - 谨慎使用单行代码,例如
sudo apt-get purge $(dpkg -l | grep deb.sury.org | awk '{print $2}')
然后使用以下命令重新安装 PHP:
sudo apt-get install php-bcmath php-bz2 php-common php-curl php-intl \
php-json php-mbstring php-mysql php-opcache php-readline php-recode \
php-tidy php-xmlrpc
答案2
我遇到了同样的问题,它与冲突包 Nginx 有关。如果您正在使用 Nginx,请尝试删除 Nginx,安装 wine32,然后重新安装 nginx。(Ubuntu 20.04、20.04 LTS)