1. 程式人生 > >Ubuntu16.04 使用apt-get安裝軟體時無法自動安裝所需要的依賴

Ubuntu16.04 使用apt-get安裝軟體時無法自動安裝所需要的依賴

出現這樣的問題,在百度上搜索瞭解決辦法,大都是在Ubuntu裡進行設定,本人進行了嘗試,但是沒有成功,倒不是說方法不好使,可能是因為我沒有設定好,所以一直沒有解決,我還太真的以為重灌系統就沒問題了,不管我安裝Ubuntu16還是Ubuntu14這個問題都一直出現,說真的我有點崩潰,但是生活還有繼續不是嗎?由於出現問題的時候我太著急了,沒有截圖,所以看著有點不大舒暢,還望理解。

問題的原因出現在Ubuntu的 源 上,以下是解決辦法

首先使用

sudo gedit  /etc/apt/sources.list

然後將以下內容貼上到文字的最下方

deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

然後 source /etc/apt/sources.list

最後 sudo apt-get update

現在,我們就可以去安裝我們想要安裝的軟體,而無需擔心依賴的問題了。