Steam无法安装。软件包依赖问题

Steam无法安装。软件包依赖问题

我曾尝试在 64 位 Ubuntu 20.04 上安装 Steam,但每次都会出现以下错误:

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

我尝试过这个:

~$ apt-cache policy libgl1-mesa-dri:i386 libgl1-mesa-glx:i386
libgl1-mesa-dri:i386:
  Installed: (none)
  Candidate: 20.0.4-2ubuntu1
  Version table:
     20.1~git2004290730.35ee6b~oibaf~b -1
        100 /var/lib/dpkg/status
     20.0.4-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main i386 Packages
libgl1-mesa-glx:i386:
  Installed: (none)
  Candidate: 20.0.4-2ubuntu1
  Version table:
     20.0.4-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main i386 Packages

和这个:

$ apt policy libgl1-mesa-dri
libgl1-mesa-dri:
  Installed: 20.0.4-2ubuntu1
  Candidate: 20.0.4-2ubuntu1
  Version table:
 *** 20.0.4-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

加上这个:

sudo dpkg --add-architecture i386
sudo apt-get update

最后,这个没有返回任何内容:

dpkg --get-selections | grep hold

但这并没有什么帮助。

答案1

降级一些软件包。

正如本文所述,我的版本高于推荐版本。与我之前的问题一样,降级后问题得到了解决。

$ apt-cache policy libgl1-mesa-dri:i386 libgl1-mesa-glx:i386
libgl1-mesa-dri:i386:
  Installed: (none)
  Candidate: 20.0.4-2ubuntu1
  Version table:
     20.1~git2004290730.35ee6b~oibaf~b -1
        100 /var/lib/dpkg/status
     20.0.4-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main i386 Packages

尝试安装该软件包的该版本,导致出现以下情况:

$ 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: libdrm-amdgpu1:i386 (>= 2.4.100) but it is not going to be installed
                        Depends: libdrm-intel1:i386 (>= 2.4.38) but it is not going to be installed
                        Depends: libdrm-nouveau2:i386 (>= 2.4.66) but it is not going to be installed
                        Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not going to be installed
                        Depends: libdrm2:i386 (>= 2.4.75) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

因此,我需要降级所有这些依赖包,尝试再次安装上述包,然后尝试再次安装 Steam。

就这样了。

相关内容