`

yum在线安装No more mirrors to try,Couldn't resolve host 'mirrorlist.centos.org

 
阅读更多

 

 

 

 

 

1 目的:  yum 安装mysql

 

2 安装过程中,出现:

Error Downloading Packages:
  mysql-5.0.95-5.el5_9.i386: failure: CentOS/mysql-5.0.95-5.el5_9.i386.rpm from base: [Errno 256] No more mirrors to try.
  perl-DBI-1.52-2.el5.i386: failure: CentOS/perl-DBI-1.52-2.el5.i386.rpm from base: [Errno 256] No more mirrors to try.
  mysql-server-5.0.95-5.el5_9.i386: failure: CentOS/mysql-server-5.0.95-5.el5_9.i386.rpm from base: [Errno 256] No more mirrors to try.
  perl-DBD-MySQL-3.0007-2.el5.i386: failure: CentOS/perl-DBD-MySQL-3.0007-2.el5.i386.rpm from base: [Errno 256] No more mirrors to try.

 

 

 

3

 

使用yum clean all命令清除后出现如下错误:

14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

 

 

原因:
 dns服务器没有配置正确

解决办法:
1、打开文件vim /etc/sysconfig/network-scripts/ifcfg-eth0在其中添加:

 

DNS1=x.x.x.x
DNS2=x.x.x.x

 

保存文件即可

-----------

有的系统需要修改/etc/resolv.conf,添加nameserver  x.x.x.x

再重启服务 service network restart

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics