由于软件包损坏,无法安装 Warzone2100

由于软件包损坏,无法安装 Warzone2100

我尝试使用命令sudo apt install warzone2100安装 Warzone 2100,但出现以下错误。请问有人能建议如何解决这个问题吗?

Laptop@HP-DM1Z:~$ sudo apt install warzone2100
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:
 warzone2100 : Depends: libglew2.0 (>= 1.12.0) but it is not installable
               Depends: libqt5core5a (>= 5.7.0) but 5.5.1+dfsg-16ubuntu7.5 is to be installed
               Depends: libqt5script5 (>= 5.6.0~beta) but 5.5.1+dfsg-2build1 is to be installed
               Depends: libstdc++6 (>= 6) but 5.4.0-6ubuntu1~16.04.4 is to be installed
E: Unable to correct problems, you have held broken packages.

编辑:我目前正在使用 Ubuntu 16.04 LTS。

如果我apt policy warzone2100 libglew2.0 libqt5core5a libqt5script5 libstdc++6在终端中输入,结果显示如下:

  Laptop@HP-DM1Z:~$ apt policy warzone2100 libglew2.0 libqt5core5a libqt5script5 libstdc++6
warzone2100:
  Installed: (none)
  Candidate: 3.2.3-1~getdeb2~zesty
  Version table:
     3.2.3-1~getdeb2~zesty 500
        500 http://archive.getdeb.net/ubuntu zesty-getdeb/games amd64 Packages
     3.1.1-2 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
libglew2.0:
  Installed: (none)
  Candidate: (none)
  Version table:
libqt5core5a:
  Installed: 5.5.1+dfsg-16ubuntu7.5
  Candidate: 5.5.1+dfsg-16ubuntu7.5
  Version table:
 *** 5.5.1+dfsg-16ubuntu7.5 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.5.1+dfsg-16ubuntu7 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libqt5script5:
  Installed: 5.5.1+dfsg-2build1
  Candidate: 5.5.1+dfsg-2build1
  Version table:
 *** 5.5.1+dfsg-2build1 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status
libstdc++6:
  Installed: 5.4.0-6ubuntu1~16.04.4
  Candidate: 5.4.0-6ubuntu1~16.04.4
  Version table:
 *** 5.4.0-6ubuntu1~16.04.4 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.3.1-14ubuntu2 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
Laptop@HP-DM1Z:~$ 

答案1

您已启用 Zesty 的存储库 (archive.getdeb.com),其中包含与系统其余部分不兼容的版本的软件包。您需要禁用该存储库,更新软件列表,然后它应该会获得正确的版本。

  • 要禁用存储库,请在 中找到其行/etc/apt/sources.list或 中的任何文件并将其删除,或者通过在行前面/etc/apt/sources.list.d/添加 来将其注释掉。请注意,您需要编辑这些文件。#sudo

    您也可以通过系统设置 → 软件和更新图形用户界面。

  • 使用 更新您的软件列表sudo apt update

  • 尝试再次安装您的软件包:sudo apt install warzon2100。它现在应该会选择一个兼容的版本,并且您不应该再遇到任何冲突。

相关内容