无法在 Ubuntu 20.04 上安装 wine32

无法在 Ubuntu 20.04 上安装 wine32

我已经检查了网络上的所有其他答案和教程,但是当我尝试安装 wine32 时仍然收到相同的消息:

cybnom@cybnom1:~$ sudo apt-get install wine32
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.

我尝试深入研究依赖项列表,但所有 i386 库似乎都缺失且无法安装。 aptitude 没有帮助。我清除了我的 sources.list 并使用了官方的干净版本,但没有任何效果。wine64 安装完美,但我需要 32 位版本来运行我用于制作音乐的大多数 VST。

我十分感激任何帮助。

更新

正如下面的评论所示,以下是我尝试按照以下说明操作的结果https://wiki.winehq.org/Ubuntu

cybnom@cybnom1:~$ sudo dpkg --add-architecture i386 
cybnom@cybnom1:~$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
File ‘winehq.key’ already there; not retrieving.

cybnom@cybnom1:~$ sudo apt-key add winehq.key
OK
cybnom@cybnom1:~$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                 
Hit:3 http://archive.canonical.com/ubuntu focal InRelease                      
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
cybnom@cybnom1:~$ sudo apt update
Hit:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                   
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease                         
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
cybnom@cybnom1:~$ sudo apt install --install-recommends winehq-stable
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 (= 5.0.2~focal)
E: Unable to correct problems, you have held broken packages.

更新2

无法纠正问题,您持有破损的包裹已经向我推荐了,但没有dpkg --get-selections | grep hold返回任何内容,并且突触中没有损坏的包:

在此处输入图片描述

更新 3

我尝试查看依赖关系树并明确询问是否安装了 i386 包。当我尝试安装 libpcre-2-8-0 时发生了这种情况:

cybnom@cybnom1:/etc/apt/sources.list.d$ sudo apt install libpcre2-8-0: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:
 dictionaries-common : Depends: debconf (>= 1.5.5) but it is not going to be installed or
                                debconf-2.0
                       Depends: libtext-iconv-perl but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

但 debconf 和 dictionaries-common 都已安装其最新版本:

cybnom@cybnom1:/etc/apt/sources.list.d$ sudo apt install debconf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
debconf is already the newest version (1.5.73).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
cybnom@cybnom1:/etc/apt/sources.list.d$ sudo apt install dictionaries-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dictionaries-common is already the newest version (1.28.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

它们甚至没有被列为 libpcre2-8-0 的依赖项这里。我尝试重新安装 debconf,但没有成功。我清理了所有 repo 源,所以现在看起来像是官方焦点列表,加上 vscode 和 chrome。我确认我可以安装其他 i386 库,所以这是 wine32 依赖项特有的东西。另一个奇怪的是,当我使用 synaptic 要求安装 wine32 时,它会将 git 标记为删除(???)。

此时,我正在认真考虑尝试重新安装 20.04 LTS,但我推迟了,因为我现在真的没有空间来备份我的所有文件,而且这是我的工作电脑,如果它不能正常运行,我就承受不了超过一天的时间。

有没有什么解决方法?除了 LMMS 中的 VST,我实际上不使用 wine,但它们对我来说非常重要。再次感谢任何帮助。

答案1

所以,我在这里破解了代码,希望这对其他人有所帮助:

事实证明,整个问题在于某些依赖项的 i386 版本号与已安装的 amd64 版本号不同。在我的情况下,它是 libpcre2-8-0(安装了 amd64 10.35 版本)和 libgd3。我只需将它们降级为相同的可用 i386 版本号(我使用 apt-cache 策略检查了它们),然后,wine32 安装完毕,没有问题。

答案2

我在 ubuntu 20.04 上使用 wine32 时也遇到了类似的问题。就我而言,问题是由 ubuntu 团队发布后删除的更新引起的,请检查此错误 —https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1926918. 由于默认情况下 apt 不想降级软件包,因此它拒绝安装 wine32(依赖于较旧的软件包)

因此,我要做的就是降级所有使用版本 2.31-0ubuntu9.3 的软件包:

$ dpkg -l | grep 2.31-0ubuntu9.3 
ii  libc-bin                              2.31-0ubuntu9.3                        amd64        GNU C Library: Binaries
ii  libc6:amd64                           2.31-0ubuntu9.3                        amd64        GNU C Library: Shared libraries
ii  libc6:i386                            2.31-0ubuntu9.3                        i386         GNU C Library: Shared libraries
ii  libc6-dbg:amd64                       2.31-0ubuntu9.3                        amd64        GNU C Library: detached debugging symbols
ii  locales                               2.31-0ubuntu9.3                        all          GNU C Library: National Language (locale) data [support]

$ apt install libc-bin=2.31-0ubuntu9.2 libc6:amd64=2.31-0ubuntu9.2 libc6:i386=2.31-0ubuntu9.2 libc6-dbg:amd64=2.31-0ubuntu9.2 locales=2.31-0ubuntu9.2

这个依赖关系问题可能会随着新的更新而消失(当 ubuntu 团队发布 2.31-0ubuntu9.4 或更高版本时)

答案3

我想补充一下 Tömushka 的回答,使用资质降级软件包,因为它为用户提供了不同的解决方案。

对我来说,问题是,当尝试降级时libc6libc6=2.31-0ubuntu9.3libc6=2.31-0ubuntu9.2易于也会卸载所有依赖的软件包libc6,数量很多。但是,通过使用资质有可能单独降级libc6

  1. 安装资质

     sudo apt install aptitude
    
  2. 尝试降级

     sudo aptitude install libc6=2.31-0ubuntu9.2
    
  3. 对我来说,我必须按两次 n(表示否),然后资质列出了最佳选项,它只会降级而不会卸载所有其他软件包。因此,请按 y 并再次按 y 确认。


Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Remove the following packages:                                         
1)     libc-dev-bin [2.31-0ubuntu9.3 (now)]                                 

     Install the following packages:                                        
2)     libc-dev-bin:i386 [2.31-0ubuntu9.2 (focal-updates)]                  

     Downgrade the following packages:                                      
3)     libc6:i386 [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)]
4)     libc6-dbg [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)] 
5)     libc6-dev [2.31-0ubuntu9.3 (now) -> 2.31-0ubuntu9.2 (focal-updates)]

这为我解决了依赖问题。

相关内容