Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

报错命令

root@ubuntu:/etc/apt# apt-get update
Err: http://mirrors.aliyun.com/ubuntu trusty InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-backports InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-security InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-updates InRelease
Could not resolve 'mirrors.aliyun.com'
Reading package lists... Done
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty/InRelease Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-backports/InRelease Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-proposed/InRelease Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-security/InRelease Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-updates/InRelease Could not resolve 'mirrors.aliyun.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

报错原因

解析域名不对

解决方案

vim /etc/systemd/resolved.conf

dns改成8.8.8.8

Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

保存,重启机器即可

上一篇:Ubuntu下对与rtl8723be网卡频繁断网问题解决


下一篇:Datastage数据装载报错:Consumed more than 1000000 bytes looking for record delimiter