当我运行时我不断得到这个输出sudo apt-get update
:
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Temporary failure resolving 'ppa.launchpad.net'
Err:3 http://et.archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving 'et.archive.ubuntu.com'
Err:4 http://et.archive.ubuntu.com/ubuntu xenial-updates InRelease
Temporary failure resolving 'et.archive.ubuntu.com'
Err:5 http://et.archive.ubuntu.com/ubuntu xenial-backports InRelease
Temporary failure resolving 'et.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://et.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'et.archive.ubuntu.com'
W: Failed to fetch http://et.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'et.archive.ubuntu.com'
W: Failed to fetch http://et.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Temporary failure resolving 'et.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/xenial/InRelease Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
该如何解决此问题?
答案1
尝试编辑您的sources.list
并更改
deb http://et.archive.ubuntu.com/ubuntu xenial main inRelease
deb http://et.archive.ubuntu.com/ubuntu xenial-updates main inRelease
deb http://et.archive.ubuntu.com/ubuntu xenial-backports main inRelease
deb http://et.archive.ubuntu.com/ubuntu xenial-security main inRelease
然后再试一次
sudo apt-get update && sudo apt-get upgrade