我正在尝试安装 wine,但是当它说我需要 wine32 时,我也无法安装它,并且出现与尝试安装 i386 依赖项类似的消息。
我读过一篇文章(无法在 Jammy (22.04) 中安装 wine32)他把范围缩小到了 libsystemd0
来自 dpkg-architecture -l:
DEB_BUILD_ARCH=amd64
DEB_BUILD_ARCH_ABI=base
DEB_BUILD_ARCH_BITS=64
DEB_BUILD_ARCH_CPU=amd64
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_ARCH_LIBC=gnu
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_GNU_CPU=x86_64
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=x86_64-linux-gnu
DEB_BUILD_MULTIARCH=x86_64-linux-gnu
DEB_HOST_ARCH=amd64
DEB_HOST_ARCH_ABI=base
DEB_HOST_ARCH_BITS=64
DEB_HOST_ARCH_CPU=amd64
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_ARCH_LIBC=gnu
DEB_HOST_ARCH_OS=linux
DEB_HOST_GNU_CPU=x86_64
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=x86_64-linux-gnu
DEB_HOST_MULTIARCH=x86_64-linux-gnu
DEB_TARGET_ARCH=amd64
DEB_TARGET_ARCH_ABI=base
DEB_TARGET_ARCH_BITS=64
DEB_TARGET_ARCH_CPU=amd64
DEB_TARGET_ARCH_ENDIAN=little
DEB_TARGET_ARCH_LIBC=gnu
DEB_TARGET_ARCH_OS=linux
DEB_TARGET_GNU_CPU=x86_64
DEB_TARGET_GNU_SYSTEM=linux-gnu
DEB_TARGET_GNU_TYPE=x86_64-linux-gnu
DEB_TARGET_MULTIARCH=x86_64-linux-gnu
我已经添加了体系结构: dpkg --add-architecture i386
它显示在这里:dpkg --print-foreign-architectures i386
但我无法安装它:
apt-cache policy libsystemd0:{amd64,i386}
libsystemd0:
Installed: 249.11-0ubuntu3.4
Candidate: 249.11-0ubuntu3.4
Version table:
*** 249.11-0ubuntu3.4 100
100 /var/lib/dpkg/status
249.11-0ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libsystemd0:i386:
Installed: (none)
Candidate: 249.11-0ubuntu3
Version table:
249.11-0ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main i386 Packages
apt install libsystemd0:i386
Reading package lists... Done
Building dependency tree... Done
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:
apt : Depends: adduser but it is not going to be installed
Depends: gpgv or
gpgv2 but it is not going to be installed or
gpgv1 but it is not going to be installed
Depends: libapt-pkg6.0 (>= 2.4.6) but it is not going to be installed
Depends: libc6 (>= 2.34) but it is not installable
Depends: libgcc-s1 (>= 3.3.1) but it is not going to be installed
Depends: libgnutls30 (>= 3.7.0) but it is not going to be installed
Depends: libseccomp2 (>= 2.4.2) but it is not going to be installed
Depends: libstdc++6 (>= 11) but it is not going to be installed
Depends: libsystemd0 but it is not installable
Recommends: ca-certificates but it is not going to be installed
编辑:为了记录,请遵循此处的说明: https://www.linuxcapable.com/how-to-install-winehq-on-ubuntu-22-04-lts/
sudo apt install software-properties-common apt-transport-https wget -y
wget -O- https://dl.winehq.org/wine-builds/winehq.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/winehq.gpg
echo deb [signed-by=/usr/share/keyrings/winehq.gpg] http://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main | sudo tee /etc/apt/sources.list.d/winehq.list
所有这些命令均顺利完成。然后
root@michalk-desktop:~# apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://dl.winehq.org/wine-builds/ubuntu jammy InRelease [8,041 B]
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:4 http://dl.winehq.org/wine-builds/ubuntu jammy/main amd64 Packages [35.1 kB]
Get:5 http://dl.winehq.org/wine-builds/ubuntu jammy/main all Packages [928 B]
Get:6 http://dl.winehq.org/wine-builds/ubuntu jammy/main i386 Packages [34.9 kB]
Hit:7 https://download.virtualbox.org/virtualbox/debian jammy InRelease
Hit:8 https://ppa.launchpadcontent.net/savoury1/chromium/ubuntu jammy InRelease
Hit:9 https://ppa.launchpadcontent.net/savoury1/ffmpeg4/ubuntu jammy InRelease
Fetched 79.0 kB in 2s (35.1 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@michalk-desktop:~# sudo apt install winehq-stable --install-recommends -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package winehq-stable
因此,尝试分阶段:
root@michalk-desktop:~# sudo apt install winehq-staging --install-recommends -y
Reading package lists... Done
Building dependency tree... Done
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-staging : Depends: wine-staging (= 7.14~jammy-1)
E: Unable to correct problems, you have held broken packages.
root@michalk-desktop:~# sudo apt install wine-staging --install-recommends -y
Reading package lists... Done
Building dependency tree... Done
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:
apt : Depends: libapt-pkg6.0 (>= 2.4.6) but it is not going to be installed
Depends: libsystemd0 but it is not installable
bsdutils : PreDepends: libsystemd0 but it is not installable
init : PreDepends: systemd-sysv
libasound2:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
libasound2-plugins:i386 : Depends: libc6:i386 (>= 2.34) but it is not installable
Depends: libjack-jackd2-0:i386 (>= 1.9.10+20150825) but it is not installable or
libjack-0.125:i386
Depends: libpulse0:i386 (>= 0.99.1-1~) but it is not installable
等等。
编辑:
sudo apt install --reinstall libsystemd0=249.11-0ubuntu3
...
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:
init : PreDepends: systemd-sysv
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
这台机器是全新安装的,大约一周前。唯一残留的 20.04 是我的主目录。我不固定软件包,也很少使用 dpkg -i 安装软件包,以防止依赖性问题。我不认为我的软件包有问题,我认为这是它认为的“不可能的情况”。对我来说,重新安装操作系统可能更容易。
编辑:更多信息。
dpkg -l | egrep -v '^ii|rc'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-==========================================-=============================================-============-================================================================================
grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d/
/etc/apt/sources.list:deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib
/etc/apt/sources.list:# deb cdrom:[Ubuntu 22.04 LTS _Jammy Jellyfish_ - Release amd64 (20220419)]/ jammy main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
/etc/apt/sources.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
/etc/apt/sources.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
/etc/apt/sources.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy universe
/etc/apt/sources.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
/etc/apt/sources.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
/etc/apt/sources.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security main restricted
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security universe
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu jammy-security multiverse
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse
/etc/apt/sources.list:# (e.g. netinst, live or single CD). The matching "deb cdrom"
/etc/apt/sources.list.d/savoury1-ubuntu-ffmpeg4-jammy.list:deb https://ppa.launchpadcontent.net/savoury1/ffmpeg4/ubuntu/ jammy main
/etc/apt/sources.list.d/savoury1-ubuntu-ffmpeg4-jammy.list:# deb-src https://ppa.launchpadcontent.net/savoury1/ffmpeg4/ubuntu/ jammy main
/etc/apt/sources.list.d/savoury1-ubuntu-chromium-jammy.list:deb https://ppa.launchpadcontent.net/savoury1/chromium/ubuntu/ jammy main
/etc/apt/sources.list.d/savoury1-ubuntu-chromium-jammy.list:# deb-src https://ppa.launchpadcontent.net/savoury1/chromium/ubuntu/ jammy main
/etc/apt/sources.list.d/savoury1-ubuntu-chromium-jammy.list.save:deb https://ppa.launchpadcontent.net/savoury1/chromium/ubuntu/ jammy main
/etc/apt/sources.list.d/savoury1-ubuntu-chromium-jammy.list.save:# deb-src https://ppa.launchpadcontent.net/savoury1/chromium/ubuntu/ jammy main
/etc/apt/sources.list.d/owncloud.list:deb https://download.owncloud.com/desktop/ownCloud/stable/2.10/linux/Ubuntu_22.04/ /
/etc/apt/sources.list.d/savoury1-ubuntu-ffmpeg4-jammy.list.save:deb https://ppa.launchpadcontent.net/savoury1/ffmpeg4/ubuntu/ jammy main
/etc/apt/sources.list.d/savoury1-ubuntu-ffmpeg4-jammy.list.save:# deb-src https://ppa.launchpadcontent.net/savoury1/ffmpeg4/ubuntu/ jammy main
编辑:更多信息 root@michalk-desktop:~# apt-show-versions | fgrep avail root@michalk-desktop:~# apt-show-versions 没有任何与“avail”相关的内容
答案1
sudo apt install --reinstall libsystemd0=249.11-0ubuntu3
64 位软件包和 32 位软件包的版本必须匹配。
apt-cache policy libsystemd0:{amd64,i386} libsystemd0: Installed: 249.11-0ubuntu3.4 #here to high version Candidate: 249.11-0ubuntu3.4 Version table: *** 249.11-0ubuntu3.4 100 100 /var/lib/dpkg/status 249.11-0ubuntu3 500 500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages libsystemd0:i386: Installed: (none) Candidate: 249.11-0ubuntu3 Version table: 249.11-0ubuntu3 500 500 http://us.archive.ubuntu.com/ubuntu jammy/main i386 Packages
然后请重试。