ubuntu16.04控制臺(tái)無(wú)法下載軟件包問(wèn)題

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


錯(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 軟件名稱。就可以正常安裝了!

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容