![无法安装 WineHQ Stable(您持有损坏的软件包)](https://linux22.com/image/178390/%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20WineHQ%20Stable%EF%BC%88%E6%82%A8%E6%8C%81%E6%9C%89%E6%8D%9F%E5%9D%8F%E7%9A%84%E8%BD%AF%E4%BB%B6%E5%8C%85%EF%BC%89.png)
我想在 Elementaryos Hera 中安装 Wine 并按照此操作地点。我犯的唯一错误是,我从 Ubuntu 存储库安装了 wine,然后尝试从官方 wine 存储库安装 wine。然后,我使用命令安装了 wineHQ stablesudo apt-get install --install-recommends winehq-stable
因为我安装了两次 wine,所以它没有正常工作。因此,我进入终端并使用命令dpkg --list
查看安装了哪些基于 wine 的软件,并使用命令卸载了它们,sudo apt-get --purge remove program
我实际上卸载了所有已安装的软件葡萄酒以它的名义。现在,我从官方存储库重新安装了 Wine,然后添加了 WineHQ Stable 的密钥,然后尝试使用上面提到的第一个命令来安装它。但我收到了这条消息
thenotorious@T430:~$ sudo apt-get install --install-recommends winehq-stable
[sudo] password for thenotorious:
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.1~bionic)
E: Unable to correct problems, you have held broken packages.
我该如何解决这个问题?有人帮帮我吧。我已经搜索过如何删除损坏的软件包,但只是找不到我应该删除的软件包,因为我已经卸载并可能删除了 wine 的每个文件夹,并且还搜索了有关由于损坏而无法安装 wineHQ stable 的论坛包,但没有任何真正的帮助。
答案1
首先卸载Wine
要删除 wine 6.0,请在终端中运行命令:
sudo apt remove --auto-remove winehq-stable
再次安装 wine (运行以下命令)
sudo dpkg --add-architecture i386
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' (only Ubuntu 20.04)
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main' (only Ubuntu 20.10)
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' (only Ubuntu 18.04)
sudo apt update && sudo apt install --install-recommends winehq-stable
答案2
winehq-stable
我在官方存储库中找不到。它看起来像是来自 ppa 或者您是从 wine.org 安装它。
查找时遇到问题wine-stable
。我发现它确实存在于官方仿生存储库。 wine-stable
位于该universe
部分。
该universe
部分适用于 ubuntu 核心团队不支持的软件包。系统默认情况下不启用它。检查您的/etc/apt/sources.list
或/etc/apt/sources.list.d/*
.如果您没有看到类似下面的内容,请继续添加它(更改 URL 以匹配其他条目使用的镜像)。
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://nl.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://nl.archive.ubuntu.com/ubuntu/ bionic universe
添加完毕后,继续apt update
,然后重试。如果您再次遇到问题,请尝试apt --fix-broken install
。