由于未满足依赖关系,无法安装 Steam

由于未满足依赖关系,无法安装 Steam

今天我尝试使用 安装 Steam sudo apt-get install steam

它不起作用并向我显示了这个错误:

barend@barend-ubu:~$ sudo apt-get 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-glx:i386
E: Unable to correct problems, you have held broken packages.

然后我尝试sudo apt-get install -f修复损坏的依赖关系。
但还是没用。

然后我在谷歌上搜索,我发现AskUbuntu 上的这个问题

最受欢迎的答案建议sudo apt-get install libc6:i386 libgl1-mesa-dri-lts-utopic:i386 libgl1-mesa-glx-lts-utopic:i386sudo apt-get install libc6:i386 libgl1-mesa-dri-lts-vivid:i386 libgl1-mesa-glx-lts-vivid:i386,但这两个答案对我都不起作用,并失败并出现以下错误:

barend@barend-ubu:~$ sudo apt-get install libc6:i386 libgl1-mesa-dri-lts-utopic:i386 libgl1-mesa-glx-lts-utopic: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:
 indicator-bluetooth : Depends: unity-control-center but it is not going to be installed or
                                gnome-control-center but it is not going to be installed or
                                ubuntu-system-settings but it is not going to be installed
 libgl1-mesa-dri-lts-utopic:i386 : Conflicts: libgl1-mesa-dri
 libgl1-mesa-glx-lts-utopic:i386 : Depends: libglapi-mesa-lts-utopic:i386 (= 10.3.2-0ubuntu1~trusty2) but it is not going to be installed
                                   Depends: libudev1:i386 but it is not going to be installed
 libqt5feedback5 : Depends: libqt5multimedia5 (>= 5.0.2) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

可能需要知道的是,我尝试使用他们网站上的 deb 安装 Steam,然后由于错误“您缺少以下 32 位库,Steam 可能无法运行:libc.so.6”而无法启动,并且我使用 卸载了 Steam sudo apt-get remove steam

我的问题是:如何再次安装 Steam 并修复损坏的软件包?

更新:

我尝试了 @Videonauth 的建议,但仍然不起作用。终端窗口弹出以下内容:

Steam needs to install these additional packages: 
  libgl1-mesa-dri:i386, libgl1-mesa-glx:i386, libc6:i386

我输入了密码,然后......

[sudo] password for barend: 
................................................................................................
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-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.6)
                        Depends: libudev1:i386 but it is not going to be installed or
                                 libudev0:i386 but it is not installable
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Press return to continue: 

现在我该怎么做?

apt-cache policy libgl1-mesa-glx libgl1-mesa-glx:i386@Videonauth 请求的输出:

  libgl1-mesa-glx:
    Installed: (none)
    Candidate: 10.1.3-0ubuntu0.6
    Version table:
       10.1.3-0ubuntu0.6 0
          500 http://ftp.nluug.nl/os/Linux/distr/ubuntu/ trusty-updates/main amd64 Packages
       10.1.0-4ubuntu5 0
          500 http://ftp.nluug.nl/os/Linux/distr/ubuntu/ trusty/main amd64 Packages
  libgl1-mesa-glx:i386:
    Installed: (none)
    Candidate: 10.1.3-0ubuntu0.6
    Version table:
       10.1.3-0ubuntu0.6 0
          500 http://ftp.nluug.nl/os/Linux/distr/ubuntu/ trusty-updates/main i386 Packages
       10.1.0-4ubuntu5 0
          500 http://ftp.nluug.nl/os/Linux/distr/ubuntu/ trusty/main i386 Packages

更新

感谢你们所有人,@Videonauth、@Mark Kirby 和 @ijustlovemath,他们试图帮助我,我真的很感激,但到目前为止,这对我没有任何帮助。嗯,我想我没有 Steam 了……

如果您建议我这样做,那么清理系统的最佳方法是什么?在尝试所有解决方案时,我已经安装和删除了很多软件包,我不确定我是否可以sudo apt-get remove steam或必须做更多。

答案1

从其网站的 .deb 文件再次安装它,然后打开终端(++ ctrl)并使用这两个命令:altt

mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1{,.disable}
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6{,.disable}

之后,启动 Steam 并让其更新。

PS:更新后 steam 可能无法再次启动,但只需重新运行这两个命令即可。缺少库的错误是由于 steam 尝试使用自己的库而不是使用系统的库。

为了解决当前的问题,请在终端中运行以下命令:

sudo apt-get 更新
sudo apt-get 安装 libgl1-mesa-glx libcheese*

答案2

apt-get在解决损坏软件包的依赖关系时有时会出现问题。尝试运行

sudo apt-get update && sudo apt-get install -f && sudo apt-get upgrade

简要地:

  • sudo apt-get update刷新在线存储库中的软件包列表
  • sudo apt-get install -f安装您正​​在安装或已经安装的软件包的所有未满足的依赖项
  • sudo apt-get upgrade再次尝试升级

答案3

尝试了所有最好的 Google 解决方案。对我而言,它们都没有用。

偶然发现答案描述了我们如何重置损坏的包裹。

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

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

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

当我尝试启动 steam 时,出现了错误glxchoosevisual failed。为此,我必须安装libnvidia-gl-450:i386库。请注意,在我的情况下,我的 nvidia 驱动程序版本是 450,因此使用它。您需要在这里使用您的版本。就是这样!然后 Steam 就可以正常启动了。

在这里分享它,希望它能对某人有帮助。

答案4

我刚刚开始工作。我进入软件和更新,将下载从最佳位置更改为“美国服务器”。然后在更新后再次尝试安装。

相关内容