我正在尝试安装 Wine,但是在执行最后一步时出现此错误:
$ sudo apt install --install-recommends winehq-stable
[sudo] password for ocean:
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 (= 6.0.2~hirsute-1)
E: Unable to correct problems, you have held broken packages.
我该如何解决这个问题?
答案1
您添加了错误的 Wine 存储库。如果您运行的是 20.04 LTS,那么它的代号是焦点。 这多毛的codename 表示 21.04,这不是您的版本。您必须删除错误的存储库,然后添加正确的存储库。
要修复该问题,请使用以下终端命令:
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main'
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt-get update
sudo apt install --install-recommends winehq-stable