【问题标题】:I screwed up my Steam installation, how do I fix my broken packages?我搞砸了我的 Steam 安装,如何修复损坏的软件包?
【发布时间】:2020-03-23 08:56:18
【问题描述】:

我有Ubuntu 18.04,不是直接安装而是从16.10升级的,在这台电脑上我有一段时间没用过Steam(可能是从18.04升级之前,不记得了)导致问题,一段时间后在互联网上寻找可能的解决方案时,我不得不承认失败。

我尝试了 sudo apt-get autoremove/update/upgrade/dist-upgrade 系列,但没有任何作用。

编辑:我也完成了 sudo apt-get clean 和 sudo apt-get install -f。

我还尝试通过删除 .steam/ 和 .local/share/Steam/ 进行完全卸载。

我知道简单地手动安装软件包的方法,但这对我也不起作用。观察:

$ sudo apt install steam
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:
 steam:i386 : Depends: libgl1-mesa-dri:i386 (>= 17.3) but it is not going to be installed or
                       libtxc-dxtn0:i386
              Depends: libgl1-mesa-dri:i386 but it is not going to be installed
              Depends: libgl1-mesa-glx:i386 but it is not going to be installed
              Recommends: nvidia-driver-libs-i386:i386 but it is not installable
E: Unable to correct problems, you have held broken packages.

由此,我尝试运行以下命令:

$ sudo apt install libgl1-mesa-dri:i386
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:
 libgl1-mesa-dri:i386 : Depends: libllvm8:i386 (>= 1:8~svn298832-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ sudo apt install libgl1-mesa-dri:i386 libllvm8:i386
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:
 libllvm8:i386 : Depends: libatomic1:i386 (>= 4.8) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ sudo apt install libgl1-mesa-dri:i386 libllvm8:i386 libatomic1:i386
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:
 debhelper : Depends: dh-autoreconf (>= 17~) but it is not going to be installed
 libatomic1:i386 : Depends: gcc-8-base:i386 (= 8.3.0-6ubuntu1~18.04.1) but 8.3.0-16ubuntu3~16.04 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

在这一点上,我真的不知道该怎么办。特别是响应“但是要安装8.3.0-16ubuntu3~16.04”这一行。我有 Ubuntu 18.04。为什么要安装 16.04 的东西?

为了完成,再试一次:

$ sudo apt install libgl1-mesa-dri:i386 libllvm8:i386 libatomic1:i386 dh-autoreconf gcc-8-base:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc-8-base:i386 is already the newest version (8.3.0-16ubuntu3~16.04).
gcc-8-base:i386 set to manually installed.
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:
 dh-autoreconf : Depends: libtool (>= 2.4.2) but it is not going to be installed
 libatomic1:i386 : Depends: gcc-8-base:i386 (= 8.3.0-6ubuntu1~18.04.1) but 8.3.0-16ubuntu3~16.04 is to be installed
E: Unable to correct problems, you have held broken packages.

并且包括 gcc-8-base:i386 什么都不做。

我是如何破坏我安装的 Ubuntu 的?

【问题讨论】:

  • 面临同样的问题。如果您找到了解决方案,请告诉我
  • 也面临这个问题。任何解决方案都会很好。

标签: ubuntu-18.04 apt steam


【解决方案1】:

尝试了所有顶级 Google 解决方案。它们都不适合我。

遇到this 回答,该回答描述了我们如何重置损坏的包。

首先备份文件/var/lib/dpkg/status。然后擦除该文件的所有内容。

然后运行sudo apt install steam。它可能会提示您是否有文件已经存在并将被覆盖。最好检查文件内容的差异。就我而言,我决定使用来自包维护者本身的那个,而不是我自己的。

Steam 安装顺利。没有得到任何未满足的依赖项错误。

当我尝试启动 Steam 时,我收到一个关于 glxchoosevisual failed 的错误。为此,我必须安装 libnvidia-gl-450:i386 库。请注意,在我的情况下,我的 nvidia 驱动程序版本是 450,所以使用它。你需要在这里使用你的版本。而已! Steam 然后启动正常。

在这里分享它以防它帮助某人。

【讨论】:

    【解决方案2】:

    检查您是否启用了restricted 和universe 存储库。

    你也可以运行:

    • 这会从包中清除本地 repo,以便再次下载它们

      apt-get clean

    • 这是重新安装损坏的软件包

      apt-get -f install

    【讨论】:

    • 已经做了 apt-get 命令,添加到 OP。至于存储库: $ sudo add-apt-repository Universe 'universe' 分发组件已为所有源启用。 $ sudo add-apt-repository restricted 'restricted' 分发组件已为所有源启用。这有什么作用?
    猜你喜欢
    • 2018-02-18
    • 1970-01-01
    • 1970-01-01
    • 2011-07-25
    • 2023-04-03
    • 1970-01-01
    • 1970-01-01
    • 2020-04-13
    • 1970-01-01
    相关资源
    最近更新 更多