为什么无法在 Debian 9 上安装 Wine?

为什么无法在 Debian 9 上安装 Wine?

按照网页中的手册说明进行操作 wiki 在 debian 中安装 wine

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" |sudo tee -a  /etc/apt/sources.list
sudo apt update

现在安装葡萄酒:

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.0~stretch)
E: Unable to correct problems, you have held broken packages.

尝试安装 wine-stable。

sudo apt install --install-recommends wine-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:
 wine-stable : Depends: wine-stable-i386 (= 5.0.0~stretch)
E: Unable to correct problems, you have held broken packages.

如此多的依赖。

sudo apt install  wine-stable-i386
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-stable-i386:i386 : Depends: libasound2-plugins:i386 but it is not going to be installed
                         Recommends: libglu1-mesa:i386 but it is not going to be installed or
                                     libglu1:i386
                         Recommends: libsdl2-2.0-0:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我的操作系统中的一些配置。

cat /etc/issue
Debian GNU/Linux 9 \n \l
ls /etc/apt/sources.list.d
google-chrome.list  google-chrome.list.save  wine-obs.list
cat  /etc/apt/sources.list.d/wine-obs.list
deb http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_9.0 ./

去掉它是没有用的。 在此输入图像描述 依赖问题仍然存在。
在此输入图像描述 没有用sudo apt dist-upgrade

在此输入图像描述 拆下包装进行检查。

sudo apt purge wine.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libwine-dev' for regex 'wine.'
Note, selecting 'winetricks' for regex 'wine.'
Note, selecting 'wine-devel-amd64' for regex 'wine.'
Note, selecting 'wine-staging-compat' for regex 'wine.'
Note, selecting 'wine-devel' for regex 'wine.'
Note, selecting 'wine-binfmt' for regex 'wine.'
Note, selecting 'wine32-preloader:i386' for regex 'wine.'
Note, selecting 'gnome-wine-icon-theme' for regex 'wine.'
Note, selecting 'wine32-development-tools' for regex 'wine.'
Note, selecting 'wine-devel-dbg' for regex 'wine.'
Note, selecting 'wine-devel-dev' for regex 'wine.'
Note, selecting 'wine64-development' for regex 'wine.'
Note, selecting 'wine-stable-dbg' for regex 'wine.'
Note, selecting 'wine-stable-dev' for regex 'wine.'
Note, selecting 'winehq-devel' for regex 'wine.'
Note, selecting 'wine1.4-amd64' for regex 'wine.'
Note, selecting 'wine-staging-i386' for regex 'wine.'
Note, selecting 'wine64-preloader' for regex 'wine.'
Note, selecting 'wine64-development-tools' for regex 'wine.'
Note, selecting 'wine1.6-dev' for regex 'wine.'
Note, selecting 'wine1.4' for regex 'wine.'
Note, selecting 'wine1.5' for regex 'wine.'
Note, selecting 'wine1.6' for regex 'wine.'
Note, selecting 'wine1.7' for regex 'wine.'
Note, selecting 'wine1.8' for regex 'wine.'
Note, selecting 'wine1.9' for regex 'wine.'
Note, selecting 'wine1.5-amd64' for regex 'wine.'
Note, selecting 'wine2.0' for regex 'wine.'
Note, selecting 'wine32-development' for regex 'wine.'
Note, selecting 'wine-devel-i386' for regex 'wine.'
Note, selecting 'wine1.7-i386' for regex 'wine.'
Note, selecting 'wine1.6-amd64' for regex 'wine.'
Note, selecting 'wine-development' for regex 'wine.'
Note, selecting 'wine32-tools' for regex 'wine.'
Note, selecting 'wine1.6-i386' for regex 'wine.'
Note, selecting 'wine-stable' for regex 'wine.'
Note, selecting 'libwine-development-dev' for regex 'wine.'
Note, selecting 'shiki-wine-theme' for regex 'wine.'
Note, selecting 'wine32' for regex 'wine.'
Note, selecting 'wine64' for regex 'wine.'
Note, selecting 'wine1.5-i386' for regex 'wine.'
Note, selecting 'libwine-development' for regex 'wine.'
Note, selecting 'winehq-stable' for regex 'wine.'
Note, selecting 'wine-staging' for regex 'wine.'
Note, selecting 'wine-i386' for regex 'wine.'
Note, selecting 'wine1.4-i386' for regex 'wine.'
Note, selecting 'wine-staging-dbg' for regex 'wine.'
Note, selecting 'wine64-development-preloader' for regex 'wine.'
Note, selecting 'wine-staging-dev' for regex 'wine.'
Note, selecting 'libwine-gecko-2.47' for regex 'wine.'
Note, selecting 'wine-stable-i386' for regex 'wine.'
Note, selecting 'wine-staging-amd64' for regex 'wine.'
Note, selecting 'winehq-staging' for regex 'wine.'
Note, selecting 'wine1.7-amd64' for regex 'wine.'
Note, selecting 'wine-stable-amd64' for regex 'wine.'
Note, selecting 'wine-amd64' for regex 'wine.'
Note, selecting 'wine64-tools' for regex 'wine.'
Note, selecting 'libkwineffects9' for regex 'wine.'
Note, selecting 'wine32-development-preloader:i386' for regex 'wine.'
Note, selecting 'wine32-tools:i386' instead of 'wine32-tools'
Note, selecting 'wine32-development-tools:i386' instead of 'wine32-development-tools'
Package 'wine1.8' is not installed, so not removed
Package 'wine1.9' is not installed, so not removed
Package 'wine1.6-dev' is not installed, so not removed
Note, selecting 'wine32-development:i386' instead of 'wine32-development'
Package 'libwine-gecko-2.47' is not installed, so not removed
Package 'wine2.0' is not installed, so not removed
Note, selecting 'wine-devel-i386:i386' instead of 'wine-devel-i386'
Note, selecting 'wine-stable-i386:i386' instead of 'wine-stable-i386'
Note, selecting 'wine-staging-i386:i386' instead of 'wine-staging-i386'
Package 'gnome-wine-icon-theme' is not installed, so not removed
Package 'libkwineffects9' is not installed, so not removed
Package 'shiki-wine-theme' is not installed, so not removed
Package 'libwine-development' is not installed, so not removed
Package 'libwine-development-dev' is not installed, so not removed
Package 'wine-development' is not installed, so not removed
Package 'wine64-development' is not installed, so not removed
Package 'wine64-development-preloader' is not installed, so not removed
Package 'wine64-development-tools' is not installed, so not removed
Package 'wine32-development-preloader:i386' is not installed, so not removed
Package 'winetricks' is not installed, so not removed
Package 'libwine-dev' is not installed, so not removed
Package 'wine-binfmt' is not installed, so not removed
Package 'wine64' is not installed, so not removed
Package 'wine64-preloader' is not installed, so not removed
Package 'wine64-tools' is not installed, so not removed
Package 'wine32-preloader:i386' is not installed, so not removed
Package 'wine-devel-amd64' is not installed, so not removed
Package 'wine-devel-dbg' is not installed, so not removed
Package 'wine-devel-dev' is not installed, so not removed
Package 'wine-devel' is not installed, so not removed
Package 'wine-stable-amd64' is not installed, so not removed
Package 'wine-stable-dbg' is not installed, so not removed
Package 'wine-stable-dev' is not installed, so not removed
Package 'wine-stable' is not installed, so not removed
Package 'wine-staging-amd64' is not installed, so not removed
Package 'wine-staging-compat' is not installed, so not removed
Package 'wine-staging-dbg' is not installed, so not removed
Package 'wine-staging-dev' is not installed, so not removed
Package 'wine-staging' is not installed, so not removed
Package 'winehq-devel' is not installed, so not removed
Package 'winehq-stable' is not installed, so not removed
Package 'winehq-staging' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

如何修复它? 在此输入图像描述

答案1

main您的sources.list 中缺少存储库(存储库中缺少可用的依赖项)main

编辑你的/etc/apt/sources.list如下:

deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main

deb http://deb.debian.org/debian-security/ stretch/updates main
deb-src http://deb.debian.org/debian-security/ stretch/updates main

deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main

deb https://dl.winehq.org/wine-builds/debian/ stretch main

禁用下面的所有存储库/etc/apt/sources.list.d/

然后运行:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt install --install-recommends winehq-stable

答案2

每当我遇到 apt 抱怨的情况时,我都会首先尝试,看更新安装是否仍然有效:

apt-get clean && apt-get update &&
  apt-get upgrade && apt-get clean && apt-get autoremove --purge &&
  apt-get dist-upgrade && apt-get clean && apt-get autoremove --purge

如果上述内容没有完成,它可能包含有用的提示,例如:尝试apt --fix-broken install

所以,你可以尝试一下sudo apt-get -f install。这通常会为我安装缺少的依赖项。

答案3

apt policy libjbig0:i386
apt policy libjbig0:amd64
sudo apt install  wine

相关内容