Tag Archives: Temporary failure in name resolution

Temporary failure in name resolution solution when Ubuntu installs essential (GCC)

Just change DNS

1 view DNS

  vi /etc/resolv.conf

2 add after the original DNS

  nameserver 114.114.114.114

  nameserver 8.8.8.8

3 reassembly

  sudo apt-get install build-essential

Prompt for update during loading

  Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

Just update

  sudo apt-get update

4 check whether the installation is successful

  gcc –version

reference resources

“Temporary failure resolving ‘CN. Archive. Ubuntu. Com’ appears in Ubuntu apt get install”_ Ben wolf CSDN blog

 

Running ntpdate reports an error: temporary failure in name resolution

I. problem error reporting:

Suddenly, I found that the time of a machine was a few minutes slow. Before, ntpd service was not set up. At present, ntpdate plus timing task is used for time synchronization. The following errors are reported when directly executing ntpdate:

# ntpdate cn.pool.ntp.org
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 3 Sep 15:46:46 ntpdate[13742]: name server cannot be used: Temporary failure in name resolution (-3)

II. Cause of problem:

Generally, the error is temporary failure in name resolution, which cannot be resolved, and the Ping test is also unsuccessful. Therefore, it is judged that there is a problem with the resolv.conf file

# ping www.baidu.com
ping: unknown host www.baidu.com

III. solution:

You can fill in the correct DNS address according to the network provider

# cat /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.8.8

# ntpdate cn.pool.ntp.org
 3 Sep 17:54:33 ntpdate[17314]: step time server 5.103.139.163 offset 995.587830 sec