如题,使用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
,恢复正常。