Steam 无法安装 Ubuntu 20.04.2

Steam 无法安装 Ubuntu 20.04.2

无论我做什么,都无法在全新安装的 Ubuntu 20.04.2 上安装 Steam。

存在无法解决的未满足的依赖关系。为什么 Steam 不发布一个只适用于 Ubuntu 的版本/安装程序?我以为他们非常支持 Linux。

我尝试手动下载缺少的依赖项并安装它们,但即使这样也失败了,可能是因为每个包都有自己的(其他)依赖项,而这些依赖项又有自己的依赖项等等。

 sudo apt install ./* && sudo apt --fix-broken install ./*
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:
 libgl1 : Breaks: libgl1:i386 (!= 1.3.1-1ubuntu0.20.04.1) but 1.3.1-1 is installed
 libgl1:i386 : Breaks: libgl1 (!= 1.3.1-1) but 1.3.1-1ubuntu0.20.04.1 is installed
 libgl1-mesa-dri : Breaks: libgl1-mesa-dri:i386 (!= 20.0.8-0ubuntu1~20.04.1) but 20.0.4-2ubuntu1 is installed
 libgl1-mesa-dri:i386 : Depends: libdrm-amdgpu1:i386 (>= 2.4.100) but it is not installed
                        Depends: libdrm-intel1:i386 (>= 2.4.38) but it is not installed
                        Depends: libdrm-nouveau2:i386 (>= 2.4.66) but it is not installed
                        Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not installed
                        Depends: libdrm2:i386 (>= 2.4.75) but it is not installed
                        Depends: libelf1:i386 (>= 0.142) but it is not installed
                        Depends: libexpat1:i386 (>= 2.0.1) but it is not installed
                        Depends: libllvm9:i386 (>= 1:9~svn298832-1~) but it is not installed
                        Depends: libsensors5:i386 (>= 1:3.5.0) but it is not installed
                        Depends: libstdc++6:i386 (>= 5.2) but it is not installed
                        Depends: libvulkan1:i386 (>= 1.2.131.2) but it is not installed
                        Depends: libzstd1:i386 (>= 1.3.2) but it is not installed
                        Depends: zlib1g:i386 (>= 1:1.1.4) but it is not installed
                        Breaks: libgl1-mesa-dri (!= 20.0.4-2ubuntu1) but 20.0.8-0ubuntu1~20.04.1 is installed
 libgl1-mesa-glx:i386 : Depends: libglx-mesa0:i386 but it is not installed
 libglapi-mesa : Breaks: libglapi-mesa:i386 (!= 20.0.8-0ubuntu1~20.04.1) but 20.0.4-2ubuntu1 is installed
 libglapi-mesa:i386 : Breaks: libglapi-mesa (!= 20.0.4-2ubuntu1) but 20.0.8-0ubuntu1~20.04.1 is installed
 libglvnd0 : Breaks: libglvnd0:i386 (!= 1.3.1-1ubuntu0.20.04.1) but 1.3.1-1 is installed
 libglvnd0:i386 : Breaks: libglvnd0 (!= 1.3.1-1) but 1.3.1-1ubuntu0.20.04.1 is installed
 libglx0 : Breaks: libglx0:i386 (!= 1.3.1-1ubuntu0.20.04.1) but 1.3.1-1 is installed
 libglx0:i386 : Depends: libglx-mesa0:i386 but it is not installed
                Breaks: libglx0 (!= 1.3.1-1) but 1.3.1-1ubuntu0.20.04.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

即使我深入其中,我仍然会看到相同的错误,并且会出现新的依赖项:

asterix@Idefix:~/Downloads/Steam$ sudo apt install wget gdebi-core libgl1-mesa-glx:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
wget is already the newest version (1.20.3-1ubuntu1).
wget 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:
 libgl1-mesa-glx:i386 : Depends: libgl1:i386 but it is not going to be installed
                        Depends: libglx-mesa0:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
asterix@Idefix:~/Downloads/Steam$ sudo apt -f install libgl1-mesa-glx: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-glx:i386 : Depends: libgl1:i386 but it is not going to be installed
                        Depends: libglx-mesa0:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
asterix@Idefix:~/Downloads/Steam$ sudo apt -f install libgl1: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:i386 : Depends: libglvnd0:i386 (= 1.3.1-1) but it is not going to be installed
               Depends: libglx0:i386 (= 1.3.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
asterix@Idefix:~/Downloads/Steam$ sudo apt -f install libglvnd0: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:
 libegl1 : Depends: libglvnd0 (= 1.3.1-1ubuntu0.20.04.1) but it is not going to be installed
 libgles2 : Depends: libglvnd0 (= 1.3.1-1ubuntu0.20.04.1) but it is not going to be installed
 libqt5svg5 : Depends: libqt5widgets5 (>= 5.12.8+dfsg~) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
asterix@Idefix:~/Downloads/Steam$ sudo apt-get install libgl1-mesa-dri:i386=20.0.4-2ubuntu1
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: libglapi-mesa:i386 (= 20.0.4-2ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

让 Steam 在最新(实际上并不是那么新)版本的 Ubuntu 上运行似乎完全不可能(虽然 20.10 已经发布了)。

这个问题可以解决吗?或者 Steam 不再支持 Ubuntu?

答案1

遇到了类似的问题:dist-upgrade删除了我的 Steam,但无法重新安装。
我无法回滚更新的软件包,因为以前的版本不再存在于存储库中(?!)。

事实证明我安装的版本与Steam 所需的版本libllvm11 11.0.1相冲突。libllvm11:i386 11.0.0

它们只是因为版本不同而发生冲突,所以我降级libllvm1111.0.0(以及Clang和所有相关包)。

以下是我具体做的:

  • 首先:sudo apt update确保sudo apt upgrade这不能解决问题。

  • 安装 Aptitude,因为它似乎具有更智能的冲突解决功能。sudo apt install aptitude

  • 使用 Aptitude 启动 Steam 安装,但不确认安装。您只想查看输出。sudo aptitude install -s steam-s意味着进行试运行而不实际安装)。

    对我来说,Aptitude 提出了一个非常激进的冲突解决方案,我不喜欢这个方案,因为它删除了一些软件包。

    但它也解释了问题所在。它说:

    libllvm11 : Breaks: libllvm11:i386 (!= 1:11.0.1~++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158) but have installed 1:11.0.0-2~ubuntu20.04.1
    libllvm11:i386 : Breaks: libllvm11 (!= 1:11.0.0-2~ubuntu20.04.1) but installing 1:11.0.1~++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158
    

    (手动翻译为英文,实际输出可能略有不同)

    基本上,它说需要安装libllvm11:i386,这与已安装 相冲突libllvm11。但冲突只是因为它们的版本不同;如果版本相同,您可以同时安装两者。但存储库中可用的 版本比我安装的libllvm11:i386版本旧。libllvm11

  • 解决方案是降级libllvm11到建议的版本:sudo apt install libllvm11=1:11.0.0-2~ubuntu20.04.1

    这卸载了我的 Clang 11 和相关工具,因为它们需要最新的 LLVM 版本。如果您同时降级它们,它们可能不会被卸载,但对我来说,稍后重新安装它们更容易。

  • 现在您应该可以安装 Steam sudo aptitude install steam:。

    在确认安装之前,请确保它不再要删除任何软件包。

  • 现在你可能想要恢复你的 Clang 11。我尝试过:

    sudo apt install \
        clang-11=1:11.0.0-2~ubuntu20.04.1 \
        clangd-11=1:11.0.0-2~ubuntu20.04.1 \
        clang-tools-11=1:11.0.0-2~ubuntu20.04.1 \
        clang-tidy-11=1:11.0.0-2~ubuntu20.04.1 \
        lld-11=1:11.0.0-2~ubuntu20.04.1
    

    注意与手动安装的版本相匹配的版本libllvm11

    请注意,我们正在使用apt这个时间,因为在这种情况下它可以提供更好的错误消息。

    我得到以下信息:

    clang-11 : Depends on: libclang-cpp11 but it won't be installed
               Depends on: libclang-common-11-dev (= 1:11.0.0-2~ubuntu20.04.1) but it won't be installed
               Depends on: libclang1-11 (= 1:11.0.0-2~ubuntu20.04.1) but 1:11.0.1~++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158 must be installed
               Recommends: llvm-11-dev but it won't be installed
               Recommends: libomp-11-dev but it won't be installed
    clang-tidy-11 : Depends on: libclang-cpp11 but it won't be installed
                    Depends on: libclang-common-11-dev but it won't be installed
    clang-tools-11 : Depends on: libclang-cpp11 but it won't be installed
    clangd-11 : Depends on: libclang-cpp11 but it won't be installed
                Depends on: libclang-common-11-dev (= 1:11.0.0-2~ubuntu20.04.1) but it won't be installed
    

    (手动翻译为英文,实际输出可能略有不同)

    我们将所有这些包添加到命令中,并使用相同的=<version>后缀,然后重复相同的操作(大约 3 次),直到得到以下内容:

    sudo apt install \
        clang-11=1:11.0.0-2~ubuntu20.04.1 \
        clangd-11=1:11.0.0-2~ubuntu20.04.1 \
        clang-tools-11=1:11.0.0-2~ubuntu20.04.1 \
        clang-tidy-11=1:11.0.0-2~ubuntu20.04.1 \
        lld-11=1:11.0.0-2~ubuntu20.04.1 \
        libclang-cpp11=1:11.0.0-2~ubuntu20.04.1 \
        libclang-common-11-dev=1:11.0.0-2~ubuntu20.04.1 \
        libclang1-11=1:11.0.0-2~ubuntu20.04.1 \
        llvm-11-dev=1:11.0.0-2~ubuntu20.04.1 \
        libomp-11-dev=1:11.0.0-2~ubuntu20.04.1 \
        libomp5-11=1:11.0.0-2~ubuntu20.04.1 \
        llvm-11=1:11.0.0-2~ubuntu20.04.1 \
        llvm-11-tools=1:11.0.0-2~ubuntu20.04.1 \
        llvm-11-runtime=1:11.0.0-2~ubuntu20.04.1
    

    它确实起作用并安装了 Clang。

  • 然后我们将所有这些依赖项标记为“自动安装”,这样当您不再需要它们时它们就不会残留。

    (我不确定这一步是否有用,但它没有坏处。)

    我们对上面命令中的所有包都执行此操作(除了前 5 个,我们实际上需要它们),再加上libllvm11

    sudo apt-mark auto \
        libllvm11 \
        libclang-cpp11 \
        libclang-common-11-dev \
        libclang1-11 \
        llvm-11-dev \
        libomp-11-dev \
        libclang-cpp11 \
        libclang-common-11-dev \
        libclang-cpp11 \
        libclang-cpp11 \
        libclang-common-11-dev \
        libomp5-11 \
        llvm-11 \
        llvm-11-tools \
        llvm-11-runtime
    
  • 最后,sudo apt ugpradesudo apt autoremove

答案2

它对我有用:

~$ sudo apt install aptitude
~$ sudo aptitude install steam

在安装过程中,我对第一个问题回答“否”:

The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libudev1:i386 [Not Installed]                      
2)     steam:i386 [Not Installed]                         

     Leave the following dependencies unresolved:         
3)     steam-devices recommends steam                     

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

我对下一个问题的回答是“是”:

The following actions will resolve these dependencies:

     Downgrade the following packages:                            
1)     libudev1 [245.4-4ubuntu3.4 (now) -> 245.4-4ubuntu3 (focal)]
2)     udev [245.4-4ubuntu3.4 (now) -> 245.4-4ubuntu3 (focal)]    

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

我终于启动了 steam,它首先启动了 steam 更新程序:

~$ steam

相关内容