分析

分析

我已遵循winehq 页面。具体来说,我运行了以下命令:

sudo dpkg --add-architecture i386 
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' 

上面的前三个命令似乎运行良好。但是,最后一个命令给出了以下错误:

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.0~bionic)
E: Unable to correct problems, you have held broken packages.

我在 USB Live Stick 上运行 Lubuntu 18.04.3。 (但是,如果我没记错的话,几天前我在普通硬盘 Lubuntu 18.04.3 安装上遇到了完全相同的错误。)

我读到过很多人都遇到过类似的错误。不幸的是,我在网上找不到任何有效的解决方案。

任何帮助都将不胜感激。谢谢!

编辑: 感谢大家的评论和建议。我今天晚些时候会尝试一下。

与此同时,有件事我不太明白。Ubuntu 18.04 已经问世近两年了。在这段时间里,肯定有人成功安装了 wine,对吧?他们怎样才能让它工作?

答案1

分析

WineHQ 存储库缺少wine-stable软件包的依赖项。
我已报告错误 48513 到 WineHQ bugzilla

这里的主要问题是糟糕的文档,文档以不可复制的方式编写。Rosanne
DiMesio 的主要观点是“懒得阅读说明的人总是会遇到问题。”。

因此,我们需要编写自己的文档,直到 WineHQ 官员变得更加聪明。

依赖项问题是由 FAudio 依赖项引起的,该依赖项不包含在 Debian/Ubuntu 和 WineHQ 存储库中。我们可以通过使用以下命令并分析其输出来确定确切的软件包名称:

$ sudo apt-get install wine-stable-amd64
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:
 wine-stable-amd64 : Depends: libfaudio0 but it is not installable
                     Recommends: libcapi20-3 but it is not going to be installed
                     Recommends: libodbc1 but it is not going to be installed
                     Recommends: libosmesa6 but it is not going to be installed
                     Recommends: libsdl2-2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

上述libfaudio0套餐仅适用于Ubuntu 19.10 和即将推出的 20.04 LTS


解决方案

我们需要遵循Ubuntu 版 WineHQ 官方指南部分地:

sudo dpkg --add-architecture i386
sudo apt update

注意:如果您添加了 WineHQ 存储库 - 使用以下命令将其删除

sudo apt-add-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' 

以防止存储库混乱,然后继续。

然后我们需要加上其他OpenSuse Build Service 中的存储库安装libfaudio0

wget -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key -O Release.key -O- | sudo apt-key add -
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'
sudo apt-get update

并且仅在此之后安装 WineHQ 软件包之一:

# Stable branch     
sudo apt install --install-recommends winehq-stable

#Development branch     
#sudo apt install --install-recommends winehq-devel

#Staging branch     
#sudo apt install --install-recommends winehq-staging

答案2

仅供参考,Wine 团队无意更新其误导性文档,因此这将继续成为基于 18.04 LTS 的任何发行版的问题:

问题出在你的系统上,而不是软件包上。

你可能缺少了 FAudio,它现在是 wine-stable 的依赖项,如 https://wiki.winehq.org/Ubuntu. 维基百科还引导用户访问 https://forum.winehq.org/viewtopic.php?f=8&t=32192有关如何为 Bionic 安装 FAudio 的说明。显然你忽略了那部分。

如果这不能解决问题,请按照 https://wiki.winehq.org/FAQ#How_do_I_solve_dependency_errors_when_trying_to_install_Wine.3F 找出您缺少的依赖项。如果您需要进一步的帮助,请在论坛上寻求帮助。Bugzilla 不提供用户支持。

友好的。

答案3

作为另一个临时解决方案,您可以使用命令安装以前的版本

apt-get install -y --install-recommends winehq-stable=4.0.3~bionic \
wine-stable=4.0.3~bionic wine-stable-amd64=4.0.3~bionic wine-stable-i386=4.0.3~bionic

维护人员修复其存储库后即可升级。

答案4

如果按照@N0rbert 的回答中的所有步骤操作后,安装 winehq-stable 仍然出现同样的错误。

执行此处给出的命令关联

sudo apt-get install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386

我遇到了同样的问题,这对我有用。

相关内容