如何为未解析的 apt 依赖项创建别名?

如何为未解析的 apt 依赖项创建别名?

前段时间,我安装了一个wormsarmageddon.deb依赖于名为 的软件包的软件包wine。由于我找不到任何分发包或 PPA 提供名为 的软件包wine(但只有wine-stablewine-stagingwine-devel),因此我最终安装了 ,wormsarmageddon并且sudo dpkg --ignore-depends wine -i wormsarmageddon.deb一切运行良好。

现在,每次我尝试使用apt-get或安装任何东西aptitude都会失败。请参见下面的示例:

fiatjaf@menger ~ [1]> sudo aptitude install openjdk-9-jdk
The following NEW packages will be installed:
  ca-certificates-java{a} dbus-x11{a} java-common{a} libatk-wrapper-java{a} 
  libatk-wrapper-java-jni{a} libbonobo2-0{a} libbonobo2-common{a} libgnome-2-0{a} 
  libgnome2-common{a} libgnomevfs2-0{a} libgnomevfs2-common{a} liborbit-2-0{a} 
  openjdk-9-jdk openjdk-9-jdk-headless{a} openjdk-9-jre{a} openjdk-9-jre-headless{a} 
0 packages upgraded, 16 newly installed, 0 to remove and 183 not upgraded.
Need to get 118 MB of archives. After unpacking 279 MB will be used.
The following packages have unmet dependencies:
 wormsarmageddon : Depends: wine (>= 1.2.1) which is a virtual package, provided by:
                            - winehq-staging (2.9.0~zesty), but it is not going to be installed
                            - winehq-staging (2.8.0~zesty), but it is not going to be installed
                            - winehq-staging (2.7.0~zesty), but it is not going to be installed
                            - winehq-staging (2.6.0~zesty), but it is not going to be installed
                            - winehq-staging (2.5.0~zesty), but it is not going to be installed
                            - winehq-staging (2.4.0-3~zesty), but it is not going to be installed
                            - winehq-staging (2.18.0~zesty), but it is not going to be installed
                            - winehq-staging (2.17.0~zesty), but it is not going to be installed
                            - winehq-staging (2.16.0~zesty), but it is not going to be installed
                            - winehq-staging (2.15.0~zesty), but it is not going to be installed
                            - winehq-staging (2.14.0~zesty), but it is not going to be installed
                            - winehq-staging (2.13.0~zesty), but it is not going to be installed
                            - winehq-staging (2.12.0~zesty), but it is not going to be installed
                            - winehq-staging (2.11.0~zesty), but it is not going to be installed
                            - winehq-staging (2.10.0~zesty), but it is not going to be installed
                            - winehq-stable (2.0.2~zesty), but 2.0.2~zesty is installed
                            - winehq-stable (2.0.1~zesty), but 2.0.2~zesty is installed
                            - winehq-stable (2.0.0~zesty), but 2.0.2~zesty is installed
                            - winehq-devel (2.9.0~zesty), but it is not going to be installed
                            - winehq-devel (2.8.0~zesty), but it is not going to be installed
                            - winehq-devel (2.7.0~zesty), but it is not going to be installed
                            - winehq-devel (2.6.0~zesty), but it is not going to be installed
                            - winehq-devel (2.5.0~zesty), but it is not going to be installed
                            - winehq-devel (2.4.0-3~zesty), but it is not going to be installed
                            - winehq-devel (2.18.0~zesty), but it is not going to be installed
                            - winehq-devel (2.17.0~zesty), but it is not going to be installed
                            - winehq-devel (2.16.0~zesty), but it is not going to be installed
                            - winehq-devel (2.15.0~zesty), but it is not going to be installed
                            - winehq-devel (2.14.0~zesty), but it is not going to be installed
                            - winehq-devel (2.13.0~zesty), but it is not going to be installed
                            - winehq-devel (2.12.0~zesty), but it is not going to be installed
                            - winehq-devel (2.11.0~zesty), but it is not going to be installed
                            - winehq-devel (2.10.0~zesty), but it is not going to be installed
                            - wine-stable (1.8.7-1ubuntu1), but 2.0.2~zesty is installed
                            - wine-development (2.0-3ubuntu1), but it is not going to be installed

The following actions will resolve these dependencies:

     Remove the following packages:              
1)     wormsarmageddon [3.7.2.1-0 (now, testing)]



Accept this solution? [Y/n/q/?] 

令我烦恼的是,它wine被所有其他“wine”识别为“虚拟包”,其中一些确实已经安装。

那么,我该如何解决这种情况呢?


更新

因此,根据评论的建议,我尝试重新安装 wine。apt抱怨了很多事情,但看起来 wine 确实没有正确安装(请注意,现在的输出是“待安装”,而不是之前的“已安装”——我不知道为什么)。

fiatjaf@menger ~> sudo apt-get install --reinstall wine-stable
[sudo] password for fiatjaf: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 openjdk-9-jre-headless : Depends: ca-certificates-java but it is not going to be installed
                          Depends: java-common (>= 0.28) but it is not going to be installed
 wine-stable : Depends: wine-stable-amd64 (= 2.0.3~zesty) but 2.0.2~zesty is to be installed
               Depends: wine-stable-i386 (= 2.0.3~zesty)
 winehq-stable : Depends: wine-stable (= 2.0.2~zesty)
 wormsarmageddon : Depends: wine (>= 1.2.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

运行apt --fix-broken install仍然被删除wormsarmaggedon,但后来我能够运行apt-get install --reinstall wine-stable,但最终没有解决任何问题:

fiatjaf@menger ~ [130]> sudo apt-get install wormsarmageddon
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:
 wormsarmageddon : Depends: wine (>= 1.2.1)
E: Unable to correct problems, you have held broken packages.
fiatjaf@menger ~ [100]> sudo aptitude install wormsarmageddon
The following NEW packages will be installed:
  wormsarmageddon{b} 
0 packages upgraded, 1 newly installed, 0 to remove and 203 not upgraded.
Need to get 111 MB of archives. After unpacking 164 MB will be used.
The following packages have unmet dependencies:
 wormsarmageddon : Depends: wine (>= 1.2.1) which is a virtual package, provided by:
                            - winehq-staging (2.9.0~zesty), but it is not going to be installed
                            - winehq-staging (2.8.0~zesty), but it is not going to be installed
                            - winehq-staging (2.7.0~zesty), but it is not going to be installed
                            - winehq-staging (2.6.0~zesty), but it is not going to be installed
                            - winehq-staging (2.5.0~zesty), but it is not going to be installed
                            - winehq-staging (2.4.0-3~zesty), but it is not going to be installed
                            - winehq-staging (2.19.0~zesty), but it is not going to be installed
                            - winehq-staging (2.18.0~zesty), but it is not going to be installed
                            - winehq-staging (2.17.0~zesty), but it is not going to be installed
                            - winehq-staging (2.16.0~zesty), but it is not going to be installed
                            - winehq-staging (2.15.0~zesty), but it is not going to be installed
                            - winehq-staging (2.14.0~zesty), but it is not going to be installed
                            - winehq-staging (2.13.0~zesty), but it is not going to be installed
                            - winehq-staging (2.12.0~zesty), but it is not going to be installed
                            - winehq-staging (2.11.0~zesty), but it is not going to be installed
                            - winehq-staging (2.10.0~zesty), but it is not going to be installed
                            - winehq-stable (2.0.3~zesty), but 2.0.3~zesty is installed
                            - winehq-stable (2.0.2~zesty), but 2.0.3~zesty is installed
                            - winehq-stable (2.0.1~zesty), but 2.0.3~zesty is installed
                            - winehq-stable (2.0.0~zesty), but 2.0.3~zesty is installed
                            - winehq-devel (2.9.0~zesty), but it is not going to be installed
                            - winehq-devel (2.8.0~zesty), but it is not going to be installed
                            - winehq-devel (2.7.0~zesty), but it is not going to be installed
                            - winehq-devel (2.6.0~zesty), but it is not going to be installed
                            - winehq-devel (2.5.0~zesty), but it is not going to be installed
                            - winehq-devel (2.4.0-3~zesty), but it is not going to be installed
                            - winehq-devel (2.19.0~zesty), but it is not going to be installed
                            - winehq-devel (2.18.0~zesty), but it is not going to be installed
                            - winehq-devel (2.17.0~zesty), but it is not going to be installed
                            - winehq-devel (2.16.0~zesty), but it is not going to be installed
                            - winehq-devel (2.15.0~zesty), but it is not going to be installed
                            - winehq-devel (2.14.0~zesty), but it is not going to be installed
                            - winehq-devel (2.13.0~zesty), but it is not going to be installed
                            - winehq-devel (2.12.0~zesty), but it is not going to be installed
                            - winehq-devel (2.11.0~zesty), but it is not going to be installed
                            - winehq-devel (2.10.0~zesty), but it is not going to be installed
                            - wine-stable (1.8.7-1ubuntu1), but 2.0.3~zesty is installed
                            - wine-development (2.0-3ubuntu1), but it is not going to be installed

The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     wormsarmageddon [Not Installed]                    



Accept this solution? [Y/n/q/?]
fiatjaf@menger ~ [130]> apt-cache show winehq-stable
Package: winehq-stable
Source: wine-stable
Version: 2.0.3~zesty
Architecture: amd64
Maintainer: WineHQ Builds <[email protected]>
Installed-Size: 72
Depends: wine-stable (= 2.0.3~zesty)
Conflicts: wine, wine-amd64, wine-i386
Replaces: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Provides: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Section: otherosfs
Priority: optional
Description: WINE Is Not An Emulator - runs MS Windows programs
 Wine is a program which allows running Microsoft Windows programs
 (including DOS, Windows 3.x and Win32 executables) on Unix.
 .
 This compatibility package allows to use wine-stable system-wide as
 the default Wine version.
Description-md5: 3c434a64434281e632d12fce500efde1
Original-Maintainer: Scott Ritchie <[email protected]>
SHA256: 0ca3ecc91b6926ef78f1a6dbe0d96386e994a8b82996da9a0149f6e4edf2dccf
SHA1: dc3156459a2067aaff73aed2e2fc17654a9fbb05
MD5sum: 3a0354e587fb2909a3a79f4f2621a6b8
Size: 3130
Filename: pool/main/winehq-stable_2.0.3~zesty_amd64.deb

Package: winehq-stable
Source: wine-stable
Version: 2.0.2~zesty
Architecture: amd64
Maintainer: WineHQ Builds <[email protected]>
Installed-Size: 72
Depends: wine-stable (= 2.0.2~zesty)
Conflicts: wine, wine-amd64, wine-i386
Replaces: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Provides: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Section: otherosfs
Priority: optional
Description: WINE Is Not An Emulator - runs MS Windows programs
 Wine is a program which allows running Microsoft Windows programs
 (including DOS, Windows 3.x and Win32 executables) on Unix.
 .
 This compatibility package allows to use wine-stable system-wide as
 the default Wine version.
Description-md5: 3c434a64434281e632d12fce500efde1
Original-Maintainer: Scott Ritchie <[email protected]>
SHA256: 743af1b4a7c44653b0956d9e591dece336a56dee7155c1226165a324ea3b4fd6
SHA1: 63c0fb5da967f3243313cb85274f8c8b90e7662a
MD5sum: 0e97b1df770e490cc491c9b4ffc12232
Size: 3134
Filename: pool/main/winehq-stable_2.0.2~zesty_amd64.deb

Package: winehq-stable
Source: wine-stable
Version: 2.0.1~zesty
Architecture: amd64
Maintainer: WineHQ Builds <[email protected]>
Installed-Size: 72
Depends: wine-stable (= 2.0.1~zesty)
Conflicts: wine, wine-amd64, wine-i386
Replaces: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Provides: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Section: otherosfs
Priority: optional
Description: WINE Is Not An Emulator - runs MS Windows programs
 Wine is a program which allows running Microsoft Windows programs
 (including DOS, Windows 3.x and Win32 executables) on Unix.
 .
 This compatibility package allows to use wine-stable system-wide as
 the default Wine version.
Description-md5: 3c434a64434281e632d12fce500efde1
Original-Maintainer: Scott Ritchie <[email protected]>
SHA256: 9abb20a44473549e5ab098653baec4d8fabbc6b6237d8db9bf4b0616112f8db5
SHA1: 3465d8f11f5aefe7f6c02d391a580f189d6a5856
MD5sum: 0e1a22bb84112fa435c5f5dead3d7738
Size: 3134
Filename: pool/main/winehq-stable_2.0.1~zesty_amd64.deb

Package: winehq-stable
Source: wine-stable
Version: 2.0.0~zesty
Architecture: amd64
Maintainer: Michael Müller <[email protected]>
Installed-Size: 72
Depends: wine-stable (= 2.0.0~zesty)
Conflicts: wine, wine-amd64, wine-i386
Replaces: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Provides: wine, wine-amd64, wine-i386, wine1.4, wine1.4-amd64, wine1.4-i386, wine1.5, wine1.5-amd64, wine1.5-i386, wine1.6, wine1.6-amd64, wine1.6-i386, wine1.7, wine1.7-amd64, wine1.7-i386, wine32, wine64
Section: otherosfs
Priority: optional
Description: WINE Is Not An Emulator - runs MS Windows programs
 Wine is a program which allows running Microsoft Windows programs
 (including DOS, Windows 3.x and Win32 executables) on Unix.
 .
 This compatibility package allows to use wine-stable system-wide as
 the default Wine version.
Description-md5: 3c434a64434281e632d12fce500efde1
Original-Maintainer: Scott Ritchie <[email protected]>
SHA256: 7bfd03bb3edb938c94f540002fc5555487fb0ae754bf7badfb257d31b0baf327
SHA1: 54c1dd180af278139f01c02d1fd9fbb1ce49373a
MD5sum: 610ba09ee83f5a6727f1eb53d47f8d30
Size: 3132
Filename: pool/main/winehq-stable_2.0.0~zesty_amd64.deb

答案1

抱歉回复迟了,但wine-stable发行版的存储库太旧了,请添加官方 Wine 存储库,然后执行以下操作:

sudo apt update
sudo apt remove *wine*
sudo apt install winehq-staging wine-staging-amd64 wine-staging-i386 wine-staging
sudo apt install ./armageddon.deb

wine-devel应该也能工作,但是wine-staging在 Wine 配置器的暂存选项卡中有额外的功能,所以这就是我推荐它的原因。

相关内容