我已尝试遵循官方指南,但不幸的是,依赖关系存在问题。
$ sudo apt install winehq-stable
The following packages have unmet dependencies.
winehq-stable : Depends: wine-stable (= 5.0.0~eoan)
$ sudo apt install wine-stable
The following packages have unmet dependencies.
wine-stable : Depends: wine-stable-i386 (= 5.0.0~eoan)
$ sudo apt install wine-stable-i386
The following packages have unmet dependencies.
wine-stable-i386: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: 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
Recommends: libcups2:i386 but it is not going to be installed
Recommends: libgssapi-krb5-2:i386 but it is not going to be installed
Recommends: libkrb5-3:i386 but it is not going to be installed
Recommends: libodbc1:i386 but it is not going to be installed
Recommends: libsane:i386 but it is not going to be installed or
libsane1:i386
... 中间有很多步骤,最后一个步骤对我来说非常危险。
$ sudo apt install libpcre2-8-0:i386
The following NEW packages will be installed
libpcre2-8-0:i386 pinentry-curses
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) coreutils libselinux1 (due to coreutils) dash dpkg (due to dash) debconf (due to dash) tar (due to dpkg) fdisk libmount1 (due to fdisk) findutils grep
install-info (due to grep) gzip init systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) login libpam0g (due to login)
libpam-runtime (due to login) libpam-modules (due to login) mount util-linux (due to mount) sed sysvinit-utils
0 to upgrade, 2 to newly install, 1594 to remove and 0 not to upgrade.
Need to get 218 kB of archives.
After this operation, 9.097 MB disk space will be freed.
You are about to do something potentially harmful
To continue type in the phrase ‘Yes, do as I say!’
如何解决这个依赖地狱?
更新
有关已配置存储库的一些信息(还有可在此处查看):
$ grep -r ^deb /etc/apt/ --include="*.list"
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/nordvpn.list:deb https://repo.nordvpn.com/deb/nordvpn/debian stable main
/etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-eoan.list:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu eoan main
/etc/apt/sources.list.d/thopiekar-ubuntu-cura-eoan.list:deb http://ppa.launchpad.net/thopiekar/cura/ubuntu eoan main
/etc/apt/sources.list.d/spotify.list:deb http://repository.spotify.com stable non-free
/etc/apt/sources.list.d/papirus-ubuntu-papirus-eoan.list:deb http://ppa.launchpad.net/papirus/papirus/ubuntu eoan main
/etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-updates main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan universe
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-updates universe
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-updates multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu eoan-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu eoan-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu eoan-security multiverse
/etc/apt/sources.list:deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main
$ dpkg --print-foreign-architectures
i386
$ apt-cache policy winehq-stable wine-stable
winehq-stable:
Installed: (none)
Candidate: 5.0.0~eoan
Version table:
5.0.0~eoan 500
500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages
4.0.3~eoan 500
500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages
wine-stable:
Installed: (none)
Candidate: 5.0.0~eoan
Version table:
5.0.0~eoan 500
500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages
4.0.3~eoan 500
500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages
3.0.1ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
500 http://de.archive.ubuntu.com/ubuntu eoan/universe i386 Packages
(还可在此处查看。
$ dpkg -l | grep -i wine
ii | libkwineffects12 | 4:5.16.5-0ubuntu1 | amd64 | KDE window manager effects library
ii | wine-stable-amd64 | 5.0.0~eoan | amd64 | WINE Is Not An Emulator - runs MS Windows programs
更新 #2:
我已经升级到 20.40 并通过两种不同的方式安装:
$ sudo apt install --install-recommends winehq-stable 4704 21:14:36 kubesail-alexey-anufriev/alexey-anufriev ⎈
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.
winehq-stable : Depends: wine-stable (= 4.0.4~focal)
E: Unable to correct problems, you have held broken packages.
和:
sudo apt install wine64 wine32 100 ↵ 4705 21:15:40 kubesail-alexey-anufriev/alexey-anufriev ⎈
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.
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.
还是没有运气。
更新 3
$ sudo aptitude install winehq-stable
The following NEW packages will be installed:
gstreamer1.0-plugins-base:i386{a} libglib2.0-0:i386{a} libgstreamer-plugins-base1.0-0:i386{a} libgstreamer1.0-0:i386{a} libodbc1:i386{ab} libpcre3:i386{ab}
wine-stable{a} wine-stable-amd64{a} wine-stable-i386:i386{a} winehq-stable{b}
0 packages upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 52,3 MB of archives. After unpacking 466 MB will be used.
The following packages have unmet dependencies:
libodbc1 : Breaks: libodbc1:i386 (!= 2.3.7) but 2.3.6-0.1build1 is to be installed
libodbc1:i386 : Breaks: libodbc1 (!= 2.3.6-0.1build1) but 2.3.7 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
winehq-stable : Conflicts: wine but 5.0-3ubuntu1 is installed
Conflicts: wine:i386 which is a virtual package, provided by:
- winehq-staging:i386 (5.9~focal), but it is not going to be installed
- winehq-staging:i386 (5.8~focal), but it is not going to be installed
- winehq-staging:i386 (5.7~focal), but it is not going to be installed
- winehq-stable:i386 (4.0.4~focal), but it is not going to be installed
- winehq-devel:i386 (5.9~focal), but it is not going to be installed
- winehq-devel:i386 (5.8~focal), but it is not going to be installed
- winehq-devel:i386 (5.7~focal), but it is not going to be installed
- wine (5.0-3ubuntu1), but 5.0-3ubuntu1 is installed
- wine (5.0-3ubuntu1), but 5.0-3ubuntu1 is installed
- wine-development (5.5-3ubuntu1), but it is not going to be installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) gstreamer1.0-plugins-base:i386 [Not Installed]
2) libglib2.0-0:i386 [Not Installed]
3) libgstreamer-plugins-base1.0-0:i386 [Not Installed]
4) libgstreamer1.0-0:i386 [Not Installed]
5) libodbc1:i386 [Not Installed]
6) libpcre3:i386 [Not Installed]
7) wine-stable [Not Installed]
8) wine-stable-i386:i386 [Not Installed]
9) winehq-stable [Not Installed]
Leave the following dependencies unresolved:
10) libgstreamer-plugins-base1.0-0:i386 recommends gstreamer1.0-plugins-base:i386
11) wine-stable-i386:i386 recommends libodbc1:i386
Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
$ apt-cache policy winehq-stable wine-stable wine32 wine64
winehq-stable:
Installed: (none)
Candidate: 4.0.4~focal
Version table:
4.0.4~focal 500
500 https://dl.winehq.org/wine-builds/ubuntu focal/main amd64 Packages
wine-stable:
Installed: (none)
Candidate: 4.0.4~focal
Version table:
4.0.4~focal 500
500 https://dl.winehq.org/wine-builds/ubuntu focal/main amd64 Packages
3.0.1ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
500 http://de.archive.ubuntu.com/ubuntu focal/universe i386 Packages
wine32:i386:
Installed: (none)
Candidate: 5.0-3ubuntu1
Version table:
5.0-3ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe i386 Packages
wine64:
Installed: 5.0-3ubuntu1
Candidate: 5.0-3ubuntu1
Version table:
*** 5.0-3ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
100 /var/lib/dpkg/status
答案1
由于您使用的是现代 Ubuntu 20.04 LTS - 我建议删除 WineHQ 存储库并安装 Wine 5.0.3从宇宙:
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ disco main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get dist-upgrade # to get newest dependencies
下面我在评论中总结了所完成的步骤:
# remove obsolete PPA
sudo add-apt-repository -r ppa:gnome3-team/gnome3
# check real reason of the problem
sudo apt-get install aptitude
sudo aptitude install wine32:i386
通过上一个命令,我们确定有几个本地(以前来自某个存储库)安装的软件包。我们需要用官方存储库中的版本替换它们:
sudo aptitude install libfaudio0=20.04-2 libodbc1=2.3.6-0.1build1 libpcre3=2:8.39-12build1
最后安装 Wine:
sudo apt-get install wine wine32