作者:小D申俊浩 | 来源:互联网 | 2014-05-20 09:19
PYCURLERROR6-"Couldn't安装东西报错,apache安装启动解决在服务器执行的语句yuminstallcvssysstatlrzszgccgcc-c++ncurses-devellibxml2-devellibjpeg-devellibpng-developen...
PYCURL ERROR 6 - "Couldn't安装东西报错,apache安装启动解决
在服务器执行的语句
yum install cvs sysstat lrzsz gcc gcc-c++ ncurses-devel libxml2-devel libjpeg-devel libpng-devel openssl openssl-devel ntp make
报错内容如下:
Loaded plugins: fastestmirror
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 retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
解决办法
1,执行
echo "nameserver 8.8.8.8" > /etc/resolv.conf
设置dns服务器
即可
找到问题的原因,是由于服务器没设置dns服务器地址导致的上述错误
apache安装启动
1,执行
yum clean all
应该执行这两步即可。(第二步要不要执行有待验证)
2,执行
yum -y install httpd (appche服务器程序)
3,执行
/etc/init.d/httpd start (启动apache)