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 文件的源地址code

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

1.1 cp sources.list sources.list.bakit

1.2 粘贴如下内容class

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

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

二: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 updatefile

相关文章
相关标签/搜索