报错命令

[email protected]:/etc/apt# apt-get update
Err:1 http://mirrors.aliyun.com/ubuntu trusty InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:2 http://mirrors.aliyun.com/ubuntu trusty-backports InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:3 http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:4 http://mirrors.aliyun.com/ubuntu trusty-security InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:5 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 ol...

 

保存,重启机器即可

 

相关文章:

  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-05-12
  • 2022-12-23
  • 2021-04-22
猜你喜欢
  • 2022-02-05
  • 2021-09-20
  • 2021-09-08
  • 2022-12-23
  • 2021-09-13
  • 2021-07-24
  • 2022-12-23
相关资源
相似解决方案