无法安装 Wine Ubuntu 18.04,依赖项问题已解决

无法安装 Wine Ubuntu 18.04,依赖项问题已解决

我一直在关注这个帖子:无法安装 Wine Ubuntu 18.04

但安装解决方案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 to resolve the situation:

The following packages have unmet dependencies:
 wine-staging : Depends: wine-staging-amd64 (= 4.0~rc5~cosmic) but it is not going to be installed
                Depends: wine-staging-i386 (= 4.0~rc5~cosmic)
E: Unable to correct problems, you have held broken packages.

尝试安装 wine-staging-amd64 但随后出现其他依赖项问题:

sudo apt-get install wine-staging-amd64
[sudo] password for gerard: 
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:
 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
                      Recommends: libcapi20-3 but it is not going to be installed
                      Recommends: libodbc1 but it is not going to be installed
                      Recommends: libosmesa6 but it is not going to be installed
                      Recommends: libsdl2-2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

编辑:我删除了 Ubuntu 软件 GUI 中“其他软件”部分的所有外部源,运行了升级,重新启动并按照 Elvir 说明操作。成功了,谢谢!

答案1

  1. 在安装 64 位版本的 Wine 之前,在终端中运行以下命令来添加 i386 架构:

$ sudo dpkg --add-architecture i386

  1. 运行以下命令来添加 WineHQ 签名密钥:

$ wget -qO-https://dl.winehq.org/wine-builds/Release.key| sudo apt-key 添加 -

  1. 现在运行以下命令以从 WineHQ 添加相关的存储库:

$ sudo apt-add-repository'debhttp://dl.winehq.org/wine-builds/ubuntu/巧妙的主'

这是 Wine 的最新稳定版本。使用以下命令安装此版本:

sudo apt-get install --install-recommends winehq-stable

请输入当提示您选择 y/n 进行安装时。之后,稳定版本的 Wine 将安装在您的系统上。

答案2

尝试这个:

apt update
apt dist-upgrade
apt install wine-staging

相关内容