Temporary failure in name resolution, failureresolution

Source: Internet
Author: User
Tags install perl nameserver

Temporary failure in name resolution, failureresolution
Recently, When I installed perl-DBD-MySQL using yum, I encountered Temporary failure in name resolution and Trying other mirror. That is, the name resolution fails. Try to use another image. The local machine is the newly installed server. The following describes the problem and the handling process.

1. Fault
### Current Environment
[Root @ GZDB ~] # Cat/etc/issue
CentOS release 5.11 (Final)
Kernel \ r on an \ m

[Root @ GZDB ~] # Yum install perl-DBD-MySQL
..............
Bytes:
[Errno 4] IOError: <urlopen error (-3, 'temporary failure in name resolution ')> Trying other mirror.
Bytes:
[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 256] 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 256] 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 256] No more mirrors to try.

### Try to ping Baidu and the unknown host is displayed
[Root @ GZDB yum. repos. d] # ping www.baidu.com
Ping: unknown host www.baidu.com
[Root @ GZDB yum. repos. d] # ping www.baidu.com
Ping: unknown host www.baidu.com

2. troubleshooting
### In combination with the above error message and failure to ping a hundred degrees, it should be because dns resolution is not configured
[Root @ GZDB yum. repos. d] # more/etc/resolv. conf ### dns resolution Not Configured

### Add dns resolution
[Root @ GZDB yum. repos. d] # echo"
> Nameserver 121.14.37.62
> Nameserver 203.196.0.6 ">/etc/resolv. conf

[Root @ GZDB yum. repos. d] # ping www.baidu.com
PING www.a.shifen.com (119.75.217.109) 56 (84) bytes of data.
64 bytes from 119.75.217.109: icmp_seq = 1 ttl = 52 time = 38.7 MS
64 bytes from 119.75.217.109: icmp_seq = 2 ttl = 52 time = 38.8 MS
64 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 bytes ed, 0% packet loss, time 6078 ms
Rtt min/avg/max/mdev = 38.711/38.742/38.801/0.165 MS

### Success again when yum perl-DBD-MySQL
[Root @ GZDB 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
(2/3): perl-DBI-1.52-2.el5.x86_64.rpm | 600 kB
(3/3): mysql-5.0.95-5.el5_9.x86_64.rpm | 4.9 MB
Bytes -------------------------------------------------------------------------------------
Total 349 kB/s | 5.6 MB
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. 0007-2.el5

Dependency Installed:
Mysql. x86_64. 0.95-5. el5_9 perl-DBI.x86_64. 52-2.el5

Complete!

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.