今天,是進(jìn)入部門(mén)的第一天,給電腦安裝了ubuntu16.04的系統(tǒng),在安裝完成之后,發(fā)現(xiàn)在控制臺(tái)無(wú)法安裝軟件包,一直提示依賴包錯(cuò)誤如下:

在調(diào)查之后找到問(wèn)題的原因:
1、安裝軟件時(shí)往往依賴于某一軟件舊的版本,但是,如果已經(jīng)安裝了新版本,那么就會(huì)在版本之上發(fā)生沖突。
2、要裝A, 依賴B, 但是已經(jīng)安裝的軟件C也依賴B, 但是A依賴的B的版本和C依賴的B的版本不一致, 導(dǎo)致了如果要安裝B,那么C便不能正常運(yùn)行了,所以系統(tǒng)報(bào)錯(cuò)。
針對(duì)以上問(wèn)題制定解決辦法:
步驟1:更新軟件源。ubuntu自帶的軟件源比較舊,很多的軟件版本較低,國(guó)內(nèi)比較好用的源有阿里源;
? ? ? ? ? ? ? ? sudo vim /etc/apt/sources.list #修改源列表,將阿里云源復(fù)制到sources.list文件中
? ? ? ? ? ? ? ? sudo apt-get update #更新本地源列表;
? ? ? ? ? ? ? ? 阿里云源:
? ? ? ? ? ? ? ? deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
? ? ? ? ? ? ? ? deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
? ? ? ? ? ? ? ? deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
? ? ? ? ? ? ? ? deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
? ? ? ? ? ? ? ? deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
? ? ? ? ? ? ? ? deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
? ? ? ? ? ? ? ? deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
? ? ? ? ? ? ? ? deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
? ? ? ? ? ? ? ? deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
? ? ? ? ? ? ? ? deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
? ? ? ? ? ? 步驟2:sudo apt-get install 軟件名稱。這里仍會(huì)提示“有未能滿足的依賴關(guān)系“的錯(cuò)誤;
? ? ? ? ? ? 步驟3:sudo apt-get -f install。這個(gè)命令會(huì)針對(duì)當(dāng)前不滿足的依賴關(guān)系,下載正確版本的依賴庫(kù);
注意:這個(gè)過(guò)程可能十分緩慢,一定要耐心等待...
? ? ? ? ? ? 步驟4:sudo apt-get install 軟件名稱。就可以正常安裝了!