我搞砸了Steam安装,如何修复损坏的包裹?

时间:2019-11-27 18:21:04

标签: ubuntu-18.04 apt steam

我有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安装?

2 个答案:

答案 0 :(得分:1)

尝试了所有顶级Google解决方案。他们都没有为我工作。

this答案中出现,描述了我们如何重置损坏的程序包。

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

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

蒸汽安装平稳。没有得到任何未满足的依赖项错误。

当我尝试开始工作时,遇到关于glxchoosevisual failed的错误。为此,我不得不安装libnvidia-gl-450:i386库。请注意,就我而言,我的nvidia驱动程序版本为450,因此使用了该版本。您需要在这里使用您的版本。而已!然后Steam启动正常。

在这里共享它以防他人。

答案 1 :(得分:0)

检查是否已启用restricteduniverse存储库。

您还可以运行:

  • 这将从软件包中清除本地存储库,以便将其再次下载

    apt-get clean

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

    apt-get -f install