apt-get安装任何软件都报错:E:Unmet dependencies. Try 'apt-get -f install' with no packages

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值