ubuntu 16.04 apt-get update 报错解决


一:Some index files failed to download, they have been ignored, or old ones used instead.

更换国内源,修改/etc/apt/sources.list 文件的源地址

可删除掉sources.list 文件内容或备份

1.1 cp sources.list sources.list.bak

1.2 粘贴以下内容

阿里源
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

1.3 执行 apt-get update 完成源切换

二:E: Sub-process /usr/bin/dpkg returned an error code (1)

2.1 mv /var/lib/dpkg/info /var/lib/dpkg/info.bak
2.2 mkdir /var/lib/dpkg/info
2.3 apt-get update


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM