问题:
cenos6准备测试环境时,如iperf软件,需要先有c编译环境,yum -y install gcc时报错,下载了gcc的tar.gz包,但是仍需要c编译环境,报错如下:
[root@ZHCS bin]# yum -y install gmp
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
[root@ZHCS bin]# nslookup mirrorlist.centos.org
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached
解决方法:
====================
配置:
vim /etc/resolv.conf
nameserver 114.114.114.114
===================
上面的nameserver 如果有公司的本地仓库地址,可以填写本地地址,速度更快些。
c编译环境
yum install gcc
yum install gcc-c++