Temporary failure in name resolution

Source: Internet
Author: User

Recently, when installing perl-dbd-mysql with Yum, temporary failure in name resolution,trying and other mirror were encountered. That is, the name resolution fails and attempts to use a different mirror. Because this machine is the newly installed new server, the following is the description of the phenomenon and the process of the problem.

1, fault phenomenon
# # #当前环境
[Email protected] ~]# cat/etc/issue
CentOS release 5.11 (Final)
Kernel \ r on an \m

[email protected] ~]# Yum install Perl-dbd-mysql
..............
HTTP://MIRRORS.PUBYUN.COM/CENTOS/5.11/OS/X86_64/CENTOS/MYSQL-5.0.95-5.EL5_9.X86_64.RPM:
[Errno 4] IOError: <urlopen error ( -3, ' temporary failure in name resolution ') > Trying other mirror.
HTTP://MIRRORS.SINA.CN/CENTOS/5.11/OS/X86_64/CENTOS/MYSQL-5.0.95-5.EL5_9.X86_64.RPM:
[Errno 4] IOError: <urlopen error ( -3, ' temporary failure in name resolution ') > Trying other mirror.

Error Downloading Packages:
Mysql-5.0.95-5.el5_9.x86_64:failure:
centos/mysql-5.0.95-5.el5_9.x86_64.rpm from base: [Errno) No more mirrors to try.
Perl-dbi-1.52-2.el5.x86_64:failure:
centos/perl-dbi-1.52-2.el5.x86_64.rpm from base: [Errno) No more mirrors to try.
Perl-dbd-mysql-3.0007-2.el5.x86_64:failure:
centos/perl-dbd-mysql-3.0007-2.el5.x86_64.rpm from base: [Errno) No more mirrors to try.

# # #尝试ping百度, the result indicates an unknown host
[[email protected] yum.repos.d]# Ping www.baidu.com
Ping:unknown Host Www.baidu.com
[[email protected] yum.repos.d]# Ping www.baidu.com
Ping:unknown Host Www.baidu.com

2, fault resolution
# # #结合上面的错误提示及无法ping通百度, should be DNS resolution not configured
[Email protected] yum.repos.d]# more/etc/resolv.conf# # #未配置dns解析

# # #添加dns解析
[[email protected] yum.repos.d]# echo "
> NameServer 121.14.37.62
> nameserver 203.196.0.6 ">>/etc/resolv.conf

[[email protected] yum.repos.d]# Ping www.baidu.com
PING www.a.shifen.com (119.75.217.109) bytes of data.
Bytes from 119.75.217.109:icmp_seq=1 ttl=52 time=38.7 ms
Bytes from 119.75.217.109:icmp_seq=2 ttl=52 time=38.8 ms
Bytes from 119.75.217.109:icmp_seq=3 ttl=52 time=38.7 ms
---www.a.shifen.com ping statistics---
3 Packets transmitted, 3 received, 0% packet loss, time 6078ms
RTT Min/avg/max/mdev = 38.711/38.742/38.801/0.165 ms

# # #再次yum Success when Perl-dbd-mysql
[email protected] yum.repos.d]# Yum install Perl-dbd-mysql
.......
Is this OK [y/n]: Y
Downloading Packages:
(1/3): perl-dbd-mysql-3.0007-2.el5.x86_64.rpm | 148 KB 00:00
(2/3): perl-dbi-1.52-2.el5.x86_64.rpm | KB 00:00
(3/3): mysql-5.0.95-5.el5_9.x86_64.rpm | 4.9 MB 00:00
-------------------------------------------------------------------------------------
Total 349 kb/s | 5.6 MB 00:16
Running Rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
INSTALLING:PERL-DBI 1/3
Installing:mysql 2/3
Warning:/etc/my.cnf created as/etc/my.cnf.rpmnew
Installing:perl-dbd-mysql 3/3

Installed:
Perl-dbd-mysql.x86_64 0:3.0007-2.el5

Dependency installed:
mysql.x86_64 0:5.0.95-5.el5_9 perl-dbi.x86_64 0:1.52-2.el5

complete!

Temporary failure in name resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.