我之前安装了 wine-stable,但对于我想运行的一个特定程序,系统建议我运行 wine-staging。因此我卸载了 wine-stable,并尝试正常安装 wine-staging。
当我跑步时
sudo apt install wine-staging
我明白了
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 resolve the situation:
The following packages have unmet dependencies:
wine-staging : Depends: wine-staging-amd64 (= 4.0~rc7~cosmic) but it is not going to be installed
Depends: wine-staging-i386 (= 4.0~rc7~cosmic)
E: Unable to correct problems, you have held broken packages.
因此,当我尝试安装依赖项时,我只是不断地陷入我需要的东西的困境,但由于某些无法解释的原因而无法安装。
例如,当我尝试安装 wine-staging-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 resolve the situation:
The following packages have unmet dependencies:
wine-staging-amd64 : Depends: libavcodec58 (>= 7:4.0) but it is not installable
Depends: libavutil56 (>= 7:4.0) but it is not installable
Depends: libvkd3d1 but it is not installable
E: Unable to correct problems, you have held broken packages.
这是主流的 Ubuntu,安装还不到一周。我没有对我的存储库进行任何调整,在过去的一个小时里,我花了很多时间阅读各种解决方案,这些解决方案似乎对其他人都有效,但对我却不起作用,例如sudo dpkg --add-architecture i386
。我曾尝试直接从 winehq 网站安装 .deb,但 Ubuntu 软件安装进度在一秒钟内从 0 增加到 100,就像已经安装好一样,然后再次显示安装按钮,没有任何错误表明出了问题。使用 gdebi,它告诉我它有一个无法满足的依赖项——那就是它自己。我不是 Linux 新用户,在尝试安装简单软件包时从未遇到过如此荒谬的问题。WINE 项目现在发生了什么事,还是我做错了什么?这个问题严重考验我的耐心。
答案1
我刚刚修复了完全相同的问题。我得到了和你完全相同的输出。我按照 Vic 的回答。它失败了,但不是因为他的回答不够充分,而是因为我的 中有多个 wine 来源
/etc/apt/sources.list.d/additional-repositories.list
。在执行核选项之前,请检查您的附加来源列表是否有冲突的 wine 存储库。如果有,请将它们全部删除,然后按照 Vic 的回答添加正确的 repo|key 并安装所需的内容。
答案2
我遇到了类似的问题。我忘记添加 wine 存储库密钥了。
$ wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -
然后添加存储库
$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main'
并安装您想要的葡萄酒口味
$ sudo apt install winehq-staging
或者$ sudo apt install winehq-stable
查看新版本
$ wine --version
wine-4.0