如題,使用apt-get install去安裝任何軟件都報錯這個錯:
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
當我根據提示輸入:sudo apt-get -f install
的時候又出現新的錯誤:E: Sub-process /usr/bin/dpkg returned an error code (1)
折騰了半天,後來覺得應該是我之前在下載一個軟件的時候,不但沒成功安裝還把apt的某些部分搞壞了,其他軟件也下載不了。
於是,進入sudo gedit /etc/apt/sources.list
在文件的末尾看到這幾行:
deb http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free
問題應該就在這裏了(我用的是ubuntu系統不是debian)。刪除這幾行,再sudo apt-get -f install
,恢復正常。