the article links: https://blog.csdn.net/feiniao8651/article/details/60332535
in the ubuntu perform sudo apt to get the update, often an error:
Err http://security.ubuntu.com precise-security InRelease
Err, http://security.ubuntu.com precise ws-security the GPG
Temporary failure resolving ‘security.ubuntu.com’
Err http://cn.archive.ubuntu.com precise InRelease
Err http://cn.archive.ubuntu.com precise-updates InRelease
Err http://cn.archive.ubuntu.com precise-backports InRelease
Err, http://cn.archive.ubuntu.com precise the GPG
Temporary failure resolving ‘cn.archive.ubuntu.com’
Err http://cn.archive.ubuntu.com precise – updates the GPG
Temporary failure Resolving the ‘cn.archive.ubuntu.com’
Err http://cn.archive.ubuntu.com precise – backports the GPG
Temporary failure resolving ‘cn.archive.ubuntu.com’
Reading package lists… The Done
W: Failed to fetch HTTP:// http://cn.archive.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch HTTP:// http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease
W: Failed to fetch HTTP:// http://cn.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease
W: Failed to fetch HTTP:// http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Temporary failure resolving ‘security.ubuntu.com’
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving ‘cn.archive.ubuntu.com’
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Temporary failure resolving ‘cn.archive.ubuntu.com’
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Temporary failure resolving ‘cn.archive.ubuntu.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.12345678910111213141516171819202122232425262728293031323334
It is generally recommended to use a domestic mirror source, such as 163 or aliyun’s mirror server
to add the following text to the /etc/apt/ source.list file
Deb http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ raring ws-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ raring – updates the main restricted universe multiverse
deb raring – http://mirrors.aliyun.com/ubuntu/ programs main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ raring – backports main restricted universe multiverse
deb – SRC http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse
deb – SRC http://mirrors.aliyun.com/ubuntu/ raring ws-security main restricted universe multiverse
deb – SRC http://mirrors.aliyun.com/ubuntu/ raring – updates the main restricted universe multiverse
deb – SRC http://mirrors.aliyun.com/ubuntu/ raring – programs main restricted universe multiverse
deb – SRC http://mirrors.aliyun.com/ubuntu/ raring – backports main restricted universe multiverse, 12345678910
However, executing sudo Apt-get update still gives an error. The problem is that DNS is not properly configured.
solution:
sudo vi /etc/resolv.conf1
add
Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS file by HAND — YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 223.5.5.5
nameserver 223.6.6.6
Then the SUdo Apt-get Update will work.
Reference:
ubuntu apt-get update failed to resolve.
Ubuntu operating system “Failed to fetch” error solution
docker Ubuntu container to replace the alibaba source
— — —
copyright notice: this article is the original article of CSDN blogger “feiniao8651”, following CC 4.0 by-sa copyright agreement, reprint please attach the original source link and this statement.
the original link: https://blog.csdn.net/feiniao8651/article/details/60332535
Read More:
- About the problem that Ubuntu kylin can’t locate the package update
- ubuntu-how to solve the error-Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release
- E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?
- How to Solve apt get update problem: usr/lib/apt/methods/HTTPS could not be found_PUBKEY 7EA0A9C3F273FCD8
- Ubuntu 18.04 desktop installation tasksel aptitude failed (100) problem repair
- Raspberry Pi runs ubuntu-mate and reports Failed to start Load Kernel Modules error countermeasures
- Solution of apt unable to update in the docker container of raspberry pie
- [shell] sh executes the script and reports an error syntax error: “(” unexpected “)
- About node error NPM update check failed try running with sudo or get access to the local update
- Browser prompt: Source mapping error: request failed with status 404 Source URL: http://xxx.js Source mapping URL: jquery.min.map
- Ubuntu network configuration+Fixing “Failed to bring up eth0” in Ubuntu
- Vue executes NPM run Dev and reports an error: missing script: dev
- When Linux installs redis, it executes make install and reports an error: Make: * * [server. O] error 1 (solved)
- TypeError: Failed to execute ‘fetch‘ on ‘Window‘: Request with GET/HEAD method cannot have body.
- Solution to GitHub desktop login error: failed to fetch
- Hot code replace failed error in eclipse
- Linux environment setup – Update https://apt.repos.intel.com report errors
- Mex compiler error handling in MATLAB and GCC installation in Ubuntu
- Hot code replace failed in eclipse compilation
- Ubuntu 18.04/ubuntu 16.04 (Ubuntu kylin 18 / 16), the last grub installation failed