安装 Wine 时出现错误

安装 Wine 时出现错误

我想在我的 Ubuntu 20.04 LTS 上使用 LTspice。但是它不适用于 Ubuntu,所以我的教授建议我下载 Wine。

我按照https://wiki.winehq.org/Ubuntu

但是在最后一步,当我输入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.

我该如何解决这个问题?

答案1

按着这些次序 :

1.启用32位架构

sudo dpkg --add-architecture i386

2.下载并安装存储库密钥

wget -nc https://dl.winehq.org/wine-builds/winehq.key; sudo apt-key add winehq.key

3.添加wine仓库

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

注:对于 Ubuntu 19.10、 对于 Ubuntu 18.04、 对于 Ubuntu 16.04替换focaleoanbionicxenial

4.添加所需libfaudio0库的PPA

sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport

5.进行更新

sudo apt-get update

6.安装 Wine 5.0 稳定版

sudo apt install --install-recommends winehq-stable

答案2

感谢社区,我得到了答案。

您可以在此处查看如何恢复默认存储库?

答案3

可能需要降级某些软件包,如果您逐一查看依赖项,您将看到类似“libxxx (ver 20.04ubuntu9) 已安装,但需要 (ver. 20.04)”的内容。要在 20.04LTS 上解决此问题,请在文件中放入/创建/etc/apt/preferences

Package: *
Pin: release a=focal
Pin-Priority: 1001`

执行:

apt update
apt upgrade
apt install wine-stable

可选清洁/etc/apt/preferencesapt update; apt upgrade

相关内容