apt-get: Could not resolve ‘archive.ubuntu.com’

Explain the function of static keyword and final keyword in Java in detail>>>

Recently, when building the vagrant server, an access error occurred when using sudo apt get update

Err http://archive.ubuntu.com trusty InRelease

Err http://archive.ubuntu.com trusty-updates InRelease

Err http://security.ubuntu.com trusty-security InRelease

Err http://archive.ubuntu.com trusty Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://security.ubuntu.com trusty-security Release.gpg
  Could not resolve 'security.ubuntu.com'
Err http://archive.ubuntu.com trusty-updates Release.gpg
  Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease

Using Ping www.baidu.com found that data can be returned, but Ping archive. Ubuntu. Com did not respond, host machine has access to return

The correction method is:
Step 1: modify host /etc/hosts
and add the following mapping    archive.ubuntu.com    security.ubuntu.com

Step 2: restart the network service

$ /etc/init.d/networking restart

Similar Posts: