2016年3月15日星期二

解决apt-get依赖(unmet dependencies)问题

好几个月没开steam,想上商店看看,可是启动steam就报错,

You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1

按照这篇帖子,一步一步解决问题,最后一步又卡了壳,

* 解决steam报错找不到libGL.so.1问题方案,


1- If you haven't updated your computer in a while, 
copy (ctrl+c) and paste (ctrl+SHIFT+v) this (and then hit enter to run it). If you don't know what this is, just do it. :
Code:
sudo apt-get update && sudo apt-get -y upgrade
2- If you've installed Steam already, skip to step 3. If you haven't installed Steamopen Terminal with ctrl+alt+t. Then copy (ctrl+c) and paste (ctrl+SHIFT+v) this (and then hit enter to run it):
Code:
sudo apt-get install -y steam
3- Now for the fix. Copy (ctrl+c) and paste (ctrl+SHIFT+v) this to edit Steam's configuration file (and then hit enter to run it):
Code:
sudo nano /etc/ld.so.conf.d/steam.conf
4- It'll probably be blank. If it's blank, paste these two lines. If it's not blank, just paste these two lines to the very bottom. Copy (ctrl+c) and paste (ctrl+SHIFT+v) this (and then enter to run it):
Code:
/usr/lib32
/usr/lib/i386-linux-gnu/mesa
5- Save it by hitting ctrl-x, then y, then enter.

6- Now copy (ctrl+c) and paste (ctrl+SHIFT+v) this (and then hit enter to run it).:
Code:
sudo ldconfig
7- Finally, copy (ctrl+c) and paste (ctrl+SHIFT+v) this (and then hit enter to run it). It reinstalls a Mesa/OpenGL library:
Code:
sudo apt-get install --reinstall libgl1-mesa-glx:i386
8- Open Steam, download Team Fortress 2, and go kill some folks.


可是到了如上第七步骤的时候,有错误啦,

The following packages have unmet dependencies:
.................

二逼如我,按照依赖的package名字,挨行敲入

sudo apt-get install PACKAGENAME

可总是有如下类似错误,即安装不成功

0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded

然后Google一番,终于找到了解决方案,

* 无敌神龙命令出来啦!

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

自动修复这个依赖问题,自动安装缺失的包。太棒了。

至于更多的apt-get参考这篇帖子,解释的非常翔实。

没有评论:

发表评论