如果我尝试执行此 AIO 命令:
sudo apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install --install-recommends build-essential checkinstall ubuntu-restricted-extras libglib2.0-dev libgtk2.0-dev rar zip unzip p7zip p7zip-full gparted hardinfo lprng gimp geany thonny thunderbird birdtray skypeforlinux putty screen net-tools winehq-stable expect ipscan google-chrome-stable teamviewer
适当的回报:
The following packages have unmet dependencies:
winehq-stable : Depends: wine-stable (= 6.0.0~groovy-1)
E: Unable to correct problems, you have held broken packages.
如果我尝试仅安装该软件包:
sudo apt -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install --install-recommends winehq-stable
错误不会发生。
为什么?
如何使用单个命令方便地安装所有软件包而不会出现 wineHQ 错误?
更新:
这是 /etc/apt/sources.list:
# deb cdrom:[Ubuntu 20.10 _Groovy Gorilla_ - Release amd64 (20201022)] groovy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu groovy main restricted
deb-src http://archive.ubuntu.com/ubuntu groovy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu groovy-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu groovy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu groovy universe
deb-src http://archive.ubuntu.com/ubuntu groovy universe
deb http://archive.ubuntu.com/ubuntu groovy-updates universe
deb-src http://archive.ubuntu.com/ubuntu groovy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu groovy multiverse
deb-src http://archive.ubuntu.com/ubuntu groovy multiverse
deb http://archive.ubuntu.com/ubuntu groovy-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu groovy-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu groovy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu groovy-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu groovy partner
deb-src http://archive.canonical.com/ubuntu groovy partner
deb http://security.ubuntu.com/ubuntu groovy-security main restricted
deb-src http://security.ubuntu.com/ubuntu groovy-security main restricted
deb http://security.ubuntu.com/ubuntu groovy-security universe
deb-src http://security.ubuntu.com/ubuntu groovy-security universe
deb http://security.ubuntu.com/ubuntu groovy-security multiverse
deb-src http://security.ubuntu.com/ubuntu groovy-security multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
这是 /etc/apt/sources.list.d/angry-ip-scanner.list
deb [trusted=yes] http://ppa.launchpad.net/upubuntu-com/network/ubuntu wily main
deb-src [trusted=yes] http://ppa.launchpad.net/upubuntu-com/network/ubuntu wily main
这是 /etc/apt/sources.list.d/google-chrome.list
deb [signed-by=/usr/share/keyrings/google-archive-keyring.gpg] http://dl.google.com/linux/chrome/deb stable main
deb-src [signed-by=/usr/share/keyrings/google-archive-keyring.gpg] http://dl.google.com/linux/chrome/deb stable main
这是 /etc/apt/sources.list.d/skype-stable.list
deb [signed-by=/usr/share/keyrings/skypeforlinux-archive-keyring.gpg] https://repo.skype.com/deb stable main
deb-src [signed-by=/usr/share/keyrings/skypeforlinux-archive-keyring.gpg] https://repo.skype.com/deb stable main
这是 /etc/apt/sources.list.d/teamviewer.list
deb [signed-by=/usr/share/keyrings/teamviewer-archive-keyring.gpg] http://linux.teamviewer.com/deb stable main
deb-src [signed-by=/usr/share/keyrings/teamviewer-archive-keyring.gpg] http://linux.teamviewer.com/deb stable main
这是 /etc/apt/sources.list.d/winehq.list
deb [signed-by=/usr/share/keyrings/winehq-archive-keyring.gpg] https://dl.winehq.org/wine-builds/ubuntu/ groovy main
deb-src [signed-by=/usr/share/keyrings/winehq-archive-keyring.gpg] https://dl.winehq.org/wine-builds/ubuntu/ groovy main
您可以通过简单地使用该命令来解决它,而无需额外的选项并为您的发行版提供正确的来源。您通常会看到不会安装,因为当使用来自两个不同发行版的错误混合源代码行时,此包不可用。大多数时候使用较新的版本来获得安装在旧版本上的新的更高版本的软件,它永远不会安装在旧版本上。我们将需要看到您
/etc/apt/sources.list
能够进一步帮助您,apt-cache policy winehq-stable
并且另一个会很高兴看到您运行的 Ubuntu 版本,因为错误说它应该是 20.10 Groovy Gorilla。问题是将“ubuntu restricted-extras”与“winehq”放在同一个“apt”命令中。如果我将它们分开:
然后一切正常。
我已经停止对多个包使用 Apt-Get,因为它总是会导致很多问题。我开始使用 sudo dpkg -i 如下详述:
应该是这样的。
现在,如果您需要的是一种在系统中安装一个特定版本的 Wine 的方法,并手动执行,而无需处理 Apt-Get 存储库,我在下面为您提供了详细的过程,从另一个答案复制我已经发布。
在 Debian/Ubuntu 系统的存储库中安装较旧/不同版本的 Wine 是一件很痛苦的事。
计划 B:如果可能的话,考虑跳到 Manjaro。为什么?因为 Wine 包的 Manjaro 版本捆绑在一个单独的包中,并且您使用一个命令安装它:
好的。如果您无法跳到 Arch/Manjaro,以下是在基于 Debian/Ubuntu 的发行版上手动安装旧版本 Wine 的步骤:
转到https://dl.winehq.org/wine-builds/
并下载名称中包含 4.1 的所有软件包(它们的日期应该相同)
对于 Wine 4.1(我发现是最佳版本),这些是您需要的软件包。您总是需要总共五个包。
下面是我的 bash 历史记录的副本,其中包含我在最短的时间内执行此操作的命令顺序。
注意你需要如何运行
每次安装每个软件包时。这将保证在安装下一个包之前安装和配置每个包的各个依赖项。(这仅在您第一次执行此操作时需要...之后,您可以放置所有这些依赖项,将它们存储在备份位置,然后使用 sudo dpkg -i /path/*.deb 一次性安装它们)
有时,我不明白为什么会发生这种情况,您将无法使用 Wine 64 位,或者您将无法使用 Wine 32 位,两者之一。如果发生这种情况,只需再次重新安装一个大型 Wine 软件包(取决于您是否需要 amd64 或 i386)
sudo dpkg -i /path/wine-staging-amd64_4.1_buster_amd64.deb
非常不幸的是,Wine 已经在 Debian/Ubuntu 系统上像这样分发,这是一个过于复杂的过程,浪费了大量的时间。从现在开始,Manjaro 的做法应该成为 Wine 的官方分发方式。