安装 Wine 开发版本时出现错误消息:Ubuntu 18.04

安装 Wine 开发版本时出现错误消息:Ubuntu 18.04

我正尝试通过 WineHQ PPA 在 Ubuntu 18.04 Bionic Beaver 下安装 Wine 的最新开发版本(wine-devel),但是以下错误消息阻止了我:

andrew@corinth:~$ sudo apt install --install-recommends winehq-devel
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-devel : Depends: wine-devel (= 5.0.0~bionic)
E: Unable to correct problems, you have held broken packages.
andrew@corinth:~$ 

如何在 Ubuntu 18.04 下成功完成 Wine 开发版本的安装?我更愿意只使用 Wine PPA,而不是添加其他 PPA,例如 OpenSuse Build Service,如其他询问 Ubuntu 的答案...

答案1

出现此错误的原因是 WineHQ wine-devel 现在需要安装 FAudio 包才能成功安装。幸运的是,这个问题可以解决相当容易在 Ubuntu 18.04 下使用以下 3 个相对简单的步骤:

1. 添加 Wine PPA

您需要将 32 位架构添加到您的 64 位系统,以及添加 Wine PPA 和密钥:

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-get update

2. 添加 FAudio

对于 Ubuntu 18.04(较新版本的 Ubuntu 需要采用不同的方法),接下来应使用以下步骤:

cd ~/Downloads
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/amd64/libfaudio0_19.07-0~bionic_amd64.deb
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb
sudo dpkg -i libfaudio0_19.07-0~bionic_amd64.deb libfaudio0_19.07-0~bionic_i386.deb
sudo apt --fix-broken install

这可能比添加另一个 PPA(OpenSuse Build Service PPA)要容易一些……

3.安装 Wine-devel

现在终于安装最新的开发版本葡萄酒:

sudo apt install --install-recommends winehq-devel

最后测试您的安装,如在我的系统上所见:

andrew@corinth:~$ wine --version
wine-5.0
andrew@corinth:~$ 

现在你可以走了 :)

参考:

相关内容