CentOS使用yum安装软件时出现Could not retrieve mirrorlist
2016-05-22 13:23
786 查看
本人在安装CentOS操作系统后,通过yum下载一些软件时,报以下错误:
“Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error ”错误:[root@server mysql-5.0.56]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Error: Cannot find a valid baseurl for repo: addons
解决方法:
(1)使用root登陆后
(2)输入:vi /etc/systemconfig/network-scripts/ifcfg-eth0
(3)在此文件中加入DNS1=8.8.8.8
(4)然后保存
(5)service network restart
(重启网络服务); 注意:我当时没重启,没成功。
(6) yum install gcc //正常下载
“Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error ”错误:[root@server mysql-5.0.56]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError:
Error: Cannot find a valid baseurl for repo: addons
解决方法:
(1)使用root登陆后
(2)输入:vi /etc/systemconfig/network-scripts/ifcfg-eth0
(3)在此文件中加入DNS1=8.8.8.8
(4)然后保存
(5)service network restart
(重启网络服务); 注意:我当时没重启,没成功。
(6) yum install gcc //正常下载
相关文章推荐
- Pull is not possible because you have unmerged ...
- Ubuntu 下修改 Could not reliably determine the serve
- Linux下提示命令找不到:bash:command not found
- 解决Default storage engine (InnoDB) is not available导致mysql无法启动的修改办法
- MySQL4 File ‘c:\mysql\share\charsets\?.conf’ not found (Errcode: 22)的解决方法
- SQL中IS NOT NULL与!=NULL的区别
- mysql4.1以上版本连接时出现Client does not support authentication protocol问题解决办法
- movie not found的解决办法(iis)
- 解决bash: mysql: command not found 的方法
- MySQL 启动报错:File ./mysql-bin.index not found (Errcode: 13)
- Windows平台的 PHP 报错 Fatal error: Class COM not found in 的解决方法
- Apache启动错误Permission denied: httpd: could not open error log file解决方法
- sql not in 与not exists使用中的细微差别
- MYSQL出现" Client does not support authentication "的解决方法
- bash scp command not found的解决方法
- Python RuntimeError: thread.__init__() not called解决方法
- Nginx反向代理proxy_cache_path directive is not allowed错误解决方法
- fedora18 安装virtualbox 步骤 与 解决kernel driver not ...
- 解决Xcode symbol not found问题
- IOS 7.1 兼容性bug 问题,UIButton,UILabel ...