无法在 Ubuntu(实际上是 Lubuntu)18.04 LTS 上从 winehq.org 安装 wine

Ben*_*n W 19 wine lubuntu software-installation 18.04

我已按照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' 
Run Code Online (Sandbox Code Playgroud)

上述前三个似乎工作正常。但是,最后一个命令给了我以下错误:

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.
Run Code Online (Sandbox Code Playgroud)

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

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

任何帮助将非常感激。谢谢!

编辑: 感谢大家的意见和建议。今天晚些时候我会试试看。

同时,这里有一些我不明白的地方。Ubuntu 18.04 已经存在将近两年了。这么多年来,肯定有人成功安装了 wine,对吧?什么,他们做的就是它的工作?

N0r*_*ert 40

分析

WineHQ 存储库缺少wine-stable包的依赖项。
我已经向 WineHQ bugzilla报告了一个错误 48513

这里的主要问题是糟糕的文档,它以不可复制的方式编写。
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.

Run Code Online (Sandbox Code Playgroud)

上述libfaudio0软件包仅适用于Ubuntu 19.10 和即将推出的 20.04 LTS


解决方案

我们需要部分遵循Ubuntu 的官方 WineHQ 指南

sudo dpkg --add-architecture i386
sudo apt update
Run Code Online (Sandbox Code Playgroud)

注意:如果您添加了 WineHQ 存储库 - 删除它

sudo apt-add-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' 
Run Code Online (Sandbox Code Playgroud)

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

然后我们需要从 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
Run Code Online (Sandbox Code Playgroud)

并且只有在安装 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
Run Code Online (Sandbox Code Playgroud)

  • 我仍然收到错误消息:“以下软件包具有未满足的依赖项: winehq-stable : Depends: wine-stable (= 5.0.0~bionic)” (2认同)