我从 14.04 升级后卸载了 wine,现在无法再安装:
sudo apt install wine1.6
[..]
The following packages have unmet dependencies:
wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu14)
Recommends: fonts-droid but it is not installable
E: Unable to correct problems, you have held broken packages.
当我跟踪问题时,似乎libldap-2.4-2:i386
无法安装该库。这引出了一个问题,为什么你甚至需要安装 wine 386 版本?
libldap-2.4-2
如果不删除 libreoffice 和其他在 amd64 版本中具有依赖性的软件包,wine 是否是故意无法安装的?
$ sudo apt update
Hit:1 http://ch.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.canonical.com xenial InRelease
Hit:3 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty InRelease
Hit:4 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Ign:6 http://security.ubuntu.com/ubuntu xenial-security/main Sources
Ign:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources
Ign:8 http://security.ubuntu.com/ubuntu xenial-security/universe Sources
Ign:9 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources
Ign:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
Ign:11 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
Ign:12 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en
Get:13 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68.0 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [43.1 kB]
Ign:15 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
Ign:16 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages
Ign:17 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en
Ign:18 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
Ign:20 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages
Ign:21 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en
Get:22 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [25.4 kB]
Get:23 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [31.8 kB]
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages
Ign:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages
Ign:26 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en
Get:27 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B]
Ign:28 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons
Ign:6 http://security.ubuntu.com/ubuntu xenial-security/main Sources
Ign:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources
Ign:8 http://security.ubuntu.com/ubuntu xenial-security/universe Sources
Ign:9 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources
Ign:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
Ign:11 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
Ign:12 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en
Ign:15 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
Ign:16 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages
Ign:17 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en
Ign:18 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
Ign:20 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages
Ign:21 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages
Ign:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages
Ign:26 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en
Ign:28 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main Sources [64.9 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [1'872 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [18.6 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [642 B]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [250 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [241 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [116 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [11.7 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [11.7 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2'044 B]
Err:18 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata
Could not open file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_dep11_Components-amd64.yml.gz - open (13: Permission denied) [IP: 91.189.88.161 80]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [83.4 kB]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [78.9 kB]
Get:21 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [45.6 kB]
Get:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2'941 B]
Get:25 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [3'128 B]
Get:26 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1'053 B]
Ign:28 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons
Fetched 871 kB in 8s (103 kB/s)
Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/restricted/dep11/Components-amd64.yml Could not open file /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_dep11_Components-amd64.yml.gz - open (13: Permission denied) [IP: 91.189.88.161 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
原来是我的 16.04 状态不一致。我不知道是怎么回事(因为我实际上不使用 ppas)。但是可以安装 wine 1.6。您可以尝试使用 来解决问题aptitude
。只需使用R#
(其中 # 必须替换为您在屏幕上看到的数字,在我的情况下是 6)即可解决问题。
据我熟悉 Debian 的朋友所说,降级软件包的优先级并不高(这意味着您通常不会将其视为解决方案)。
sudo aptitude install wine
[...]
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libldap-2.4-2:i386 [Not Installed]
2) libosmesa6 [Not Installed]
3) libosmesa6:i386 [Not Installed]
4) p11-kit-modules:i386 [Not Installed]
5) wine [Not Installed]
6) wine1.6 [Not Installed]
7) wine1.6-amd64 [Not Installed]
8) wine1.6-i386:i386 [Not Installed]
Leave the following dependencies unresolved:
9) wine1.6-amd64 recommends libosmesa6
10) winetricks recommends wine
11) wine1.6-i386:i386 recommends libosmesa6:i386
12) wine1.6-i386:i386 recommends p11-kit-modules:i386
Accept this solution? [Y/n/q/?] R6
Rejecting the removal of wine1.6
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libldap-2.4-2:i386 [Not Installed]
2) libosmesa6 [Not Installed]
3) libosmesa6:i386 [Not Installed]
4) p11-kit-modules:i386 [Not Installed]
5) wine [Not Installed]
6) R wine1.6 [Not Installed]
7) wine1.6-amd64 [Not Installed]
8) wine1.6-i386:i386 [Not Installed]
Leave the following dependencies unresolved:
9) wine1.6-amd64 recommends libosmesa6
10) winetricks recommends wine
11) wine1.6-i386:i386 recommends libosmesa6:i386
12) wine1.6-i386:i386 recommends p11-kit-modules:i386
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) R libosmesa6 [Not Installed]
2) libosmesa6:i386 [Not Installed]
Downgrade the following packages:
3) libldap-2.4-2 [2.4.42+dfsg-2ubuntu3.1 (now) -> 2.4.42+dfsg-2ubuntu3 (xenial)]
4) libp11-kit0 [0.23.2-5~ubuntu16.04.1 (now) -> 0.23.2-3 (xenial)]
5) libp11-kit0:i386 [0.23.2-5~ubuntu16.04.1 (now) -> 0.23.2-3 (xenial)]
6) p11-kit [0.23.2-5~ubuntu16.04.1 (now) -> 0.23.2-3 (xenial)]
7) p11-kit-modules [0.23.2-5~ubuntu16.04.1 (now) -> 0.23.2-3 (xenial)]
Leave the following dependencies unresolved:
8) wine1.6-amd64 recommends libosmesa6
9) wine1.6-i386:i386 recommends libosmesa6:i386
Accept this solution? [Y/n/q/?] Y
The following packages will be DOWNGRADED:
libldap-2.4-2 libp11-kit0 libp11-kit0:i386 p11-kit p11-kit-modules
The following NEW packages will be installed:
fonts-horai-umefont{a} fonts-unfonts-core{a} fonts-wqy-microhei{a} gnome-exe-thumbnailer{a} icoutils{a} libasn1-8-heimdal:i386{a} libcapi20-3{a} libcapi20-3:i386{a} libexif12:i386{a} libgd3:i386{a}
libgif7{a} libgif7:i386{a} libglu1-mesa:i386{a} libgphoto2-6:i386{a} libgphoto2-port12:i386{a} libgssapi3-heimdal:i386{a} libhcrypto4-heimdal:i386{a} libheimbase1-heimdal:i386{a}
libheimntlm0-heimdal:i386{a} libhx509-5-heimdal:i386{a} libieee1284-3:i386{a} libkrb5-26-heimdal:i386{a} libldap-2.4-2:i386{a} libltdl7:i386{a} libmpg123-0:i386{a} libopenal1:i386{a}
libp11-kit-gnome-keyring:i386{a} libroken18-heimdal:i386{a} libsane:i386{a} libsasl2-2:i386{a} libsasl2-modules:i386{a} libsasl2-modules-db:i386{a} libusb-1.0-0:i386{a} libv4l-0:i386{a}
libv4lconvert0:i386{a} libvpx3:i386{a} libwind0-heimdal:i386{a} libxcomposite1:i386{a} libxcursor1:i386{a} libxinerama1:i386{a} libxpm4:i386{a} libxrandr2:i386{a} ocl-icd-libopencl1:i386{a} odbcinst{a}
odbcinst1debian2{a} p11-kit-modules:i386{a} p7zip{a} ttf-wqy-microhei{a} unixodbc{a} wine wine-gecko2.21{a} wine-gecko2.21:i386{a} wine-mono0.0.8{a} wine1.6{a} wine1.6-amd64{a} wine1.6-i386:i386{a}
winetricks{a}
The following packages are RECOMMENDED but will NOT be installed:
libosmesa6 libosmesa6:i386
0 packages upgraded, 57 newly installed, 5 downgraded, 0 to remove and 0 not upgraded.
Need to get 151 MB of archives. After unpacking 483 MB will be used.
Do you want to continue? [Y/n/?]
如您所见,在拒绝第一个解决方案后,我们到达了 libldap 将被“降级”的地步。然而,这看起来不像是真正的降级。它看起来更像是被推向正式版本。
答案2
为什么你甚至需要安装 wine 386 版本?
Wine 不提供 64 位二进制文件。您还应该在 16.04 上安装 wine 1.8。而不是旧的 1.6。
您可能没有完全清除旧酒。请执行...
dpkg-query --list 'wine*'
安装了设备的线路ii
。清除它们。执行...
which wine
并确保所有引用都已删除。然后执行...
sudo apt-get autoremove
此时,您的系统中应该没有 Wine。另外,检查您的主目录中是否有与 Wine 相关的目录(ls -la
列出隐藏目录)。也删除它们。
从开发版本安装 wine。
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
并使用winecfg
来安装所有要求。
winetricks
也可以从 wine 网站安装。
答案3
也许可以安装新版本的 wine,除了 1.6 之外,还发布了许多新版本,也许是 1.8 或 1.9?较新的版本意味着它们已更新,也许兼容性(以及其他问题)可以得到解决。
答案4
安装 Wine 1.6 之前需要启用 i386 架构。
确保你这样做
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine
虽然不完全是 OP 的问题,但这是 Google 上针对我的错误得到的第一个结果,因此我认为发布这个解决方案会很有帮助。