正如主题中所述,我无法安装最新的稳定 Wine 版本,因为我的计算机中出现了损坏的软件包。特别是在输入
sudo apt install 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 (= 7.0.1~focal-1)
Depends: wine-stable-amd64 (= 7.0.1~focal-1) but 4.0~bionic is to be installed
E: Unable to correct problems, you have held broken packages.
根据我的发现这里接下来我将详细介绍我所做的事情。
这是我的系统
lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: LinuxMint
Description: Linux Mint 19.2 Tina
Release: 19.2
Codename: tina
The following packages were automatically installed and are no longer required:
bridge-utils browser-plugin-freshplayer-pepperflash containerd
golang-docker-credential-helpers gstreamer1.0-plugins-base:i386
libasn1-8-heimdal:i386 libatomic1:i386 libbonobo2-0 libbonobo2-common
libbonoboui2-0 libbonoboui2-common libboost-signals1.65.1 libcap2:i386
libcapi20-3 libcapi20-3:i386 libcdparanoia0:i386 libdrm-amdgpu1:i386
libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
libedit2:i386 libegl-mesa0:i386 libegl1:i386 libelf1:i386
libevent-pthreads-2.1-6 libexif12:i386 libgbm1:i386 libgd3:i386 libgl1:i386
libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386
libglu1-mesa:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libgnome-2-0
libgnome-keyring-common libgnome-keyring0 libgnome2-common libgnomeui-0
libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgphoto2-6:i386
libgphoto2-port12:i386 libgsm1:i386 libgssapi3-heimdal:i386
libgstreamer-plugins-base1.0-0:i386 libgstreamer1.0-0:i386
libgtksourceview2.0-0 libgtksourceview2.0-common libhcrypto4-heimdal:i386
libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386
libicu60:i386 libieee1284-3:i386 libkrb5-26-heimdal:i386 liblcms2-2:i386
libldap-2.4-2:i386 libllvm10:i386 libllvm8:i386 libmpg123-0:i386
libodbc1:i386 libopenal1:i386 libopus0:i386 liborbit-2-0 liborc-0.4-0:i386
libosmesa6:i386 libpcap0.8:i386 libpciaccess0:i386 libroken18-heimdal:i386
libsane1:i386 libsasl2-2:i386 libsasl2-modules:i386 libsasl2-modules-db:i386
libsdl2-2.0-0:i386 libsensors4:i386 libsndio6.1:i386 libsqlite3-0:i386
libssl1.1:i386 libtheora0:i386 libusb-1.0-0:i386 libv4l-0:i386
libv4lconvert0:i386 libvisual-0.4-0:i386 libwayland-client0:i386
libwayland-cursor0:i386 libwayland-egl1:i386 libwayland-egl1-mesa:i386
libwayland-server0:i386 libwebp6:i386 libwind0-heimdal:i386 libx11-xcb1:i386
libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386
libxcb-sync1:i386 libxcb-xfixes0:i386 libxkbcommon0:i386 libxml2:i386
libxpm4:i386 libxshmfence1:i386 libxslt1.1:i386 libxss1:i386
libxxf86vm1:i386 lyx-common ocl-icd-libopencl1:i386 pigz python-asn1crypto
python-backports.ssl-match-hostname python-cached-property python-certifi
python-cffi-backend python-cryptography python-docker python-dockerpty
python-dockerpycreds python-docopt python-funcsigs python-functools32
python-idna python-ipaddress python-jsonschema python-mock python-openssl
python-pbr python-requests python-texttable python-urllib3 python-websocket
python-yaml runc ubuntu-fan wine-stable wine-stable-amd64
wine-stable-i386:i386
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 465 not upgraded.
当我移除 wine 时系统会给出以下答案
$ sudo apt remove wine winehq-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
Virtual packages like 'wine' can't be removed
Package 'winehq-stable' is not installed, so not removed
The following packages were automatically installed and are no longer required:
bridge-utils browser-plugin-freshplayer-pepperflash containerd
golang-docker-credential-helpers gstreamer1.0-plugins-base:i386
libasn1-8-heimdal:i386 libatomic1:i386 libbonobo2-0 libbonobo2-common
libbonoboui2-0 libbonoboui2-common libboost-signals1.65.1 libcap2:i386
libcapi20-3 libcapi20-3:i386 libcdparanoia0:i386 libdrm-amdgpu1:i386
libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386
libedit2:i386 libegl-mesa0:i386 libegl1:i386 libelf1:i386
libevent-pthreads-2.1-6 libexif12:i386 libgbm1:i386 libgd3:i386 libgl1:i386
libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386
libglu1-mesa:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libgnome-2-0
libgnome-keyring-common libgnome-keyring0 libgnome2-common libgnomeui-0
libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgphoto2-6:i386
libgphoto2-port12:i386 libgsm1:i386 libgssapi3-heimdal:i386
libgstreamer-plugins-base1.0-0:i386 libgstreamer1.0-0:i386
libgtksourceview2.0-0 libgtksourceview2.0-common libhcrypto4-heimdal:i386
libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386
libicu60:i386 libieee1284-3:i386 libkrb5-26-heimdal:i386 liblcms2-2:i386
libldap-2.4-2:i386 libllvm10:i386 libllvm8:i386 libmpg123-0:i386
libodbc1:i386 libopenal1:i386 libopus0:i386 liborbit-2-0 liborc-0.4-0:i386
libosmesa6:i386 libpcap0.8:i386 libpciaccess0:i386 libroken18-heimdal:i386
libsane1:i386 libsasl2-2:i386 libsasl2-modules:i386 libsasl2-modules-db:i386
libsdl2-2.0-0:i386 libsensors4:i386 libsndio6.1:i386 libsqlite3-0:i386
libssl1.1:i386 libtheora0:i386 libusb-1.0-0:i386 libv4l-0:i386
libv4lconvert0:i386 libvisual-0.4-0:i386 libwayland-client0:i386
libwayland-cursor0:i386 libwayland-egl1:i386 libwayland-egl1-mesa:i386
libwayland-server0:i386 libwebp6:i386 libwind0-heimdal:i386 libx11-xcb1:i386
libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386
libxcb-sync1:i386 libxcb-xfixes0:i386 libxkbcommon0:i386 libxml2:i386
libxpm4:i386 libxshmfence1:i386 libxslt1.1:i386 libxss1:i386
libxxf86vm1:i386 lyx-common ocl-icd-libopencl1:i386 pigz python-asn1crypto
python-backports.ssl-match-hostname python-cached-property python-certifi
python-cffi-backend python-cryptography python-docker python-dockerpty
python-dockerpycreds python-docopt python-funcsigs python-functools32
python-idna python-ipaddress python-jsonschema python-mock python-openssl
python-pbr python-requests python-texttable python-urllib3 python-websocket
python-yaml runc ubuntu-fan wine-stable wine-stable-amd64
wine-stable-i386:i386
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 465 not upgraded.
当我再次尝试安装 wine 时,系统给出以下答案
$ sudo apt install 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 (= 7.0.1~focal-1)
Depends: wine-stable-amd64 (= 7.0.1~focal-1) but 4.0~bionic is to be installed
E: Unable to correct problems, you have held broken packages.
你能帮助我正确理解它的意思以及我该如何修复它吗?
答案1
您的系统未启用 32 位。
请执行以下操作:
sudo dpkg --add-architecture i386
sudo add-apt-repository universe
sudo apt update
sudo apt full-upgrade
sudo apt install wine-stable
wineboot
或者你可以安装 winehq 的 wine:
对于 ubuntu 22.10:
sudo dpkg --add-architecture i386
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/kinetic/winehq-kinetic.sources
sudo apt update
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo apt update
sudo apt install winehq-stable
对于 Ubuntu 22.04(或 Linux mint 21):
sudo dpkg --add-architecture i386
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt upgrade
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo apt update
sudo apt install winehq-stable