yum安装时出现 Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again or 14: PYCURL ERROR 6 - "Couldn't resolvehost 'mirrorlist.centos.org'" or [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" or removing mirrorlist with no valid mirrors: //var/cache/yum/fedora/mirrorlist.txt Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again 可能是yum源出问题,或者网连不上。 1、先试试网络能连上不,可能ping得通wget没结果 wget www.google.com 如果连不上,先检查网络 2、改yum配置,这里改为163的源 cd /etc/yum.repos.d [root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo [root@localhost yum.repos.d]# cp CentOS-Base.repo CentOS-Base.repo.bak 将CentOS6-Base-163.repo的内容复制到CentOS-Base.repo 注意将里面的$releasever 换成Centos的版本6 如下: # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/ baseurl=http://mirrors.163.com/centos/6/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/ baseurl=http://mirrors.163.com/centos/6/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/ baseurl=http://mirrors.163.com/centos/6/extras/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/ baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib - 163.com #baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/ baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 因为太菜,更要努力学习 |
相关文章
- VM虚拟机安装之后出现无法自动登录到桌面以及__vmware_user__怎么办
- 虚拟机下Ubuntu安装VMWare Tools出现错误“找不到kernel header文件路径”解决办法
- vmware 虚拟机安装centos 本机没有出现VMnet0和VMnet8虚拟网卡的解决办法
- 安装虚拟机VMWare时出现1021错误的解决办法
- vmware虚拟机上安装红旗LINUX时硬盘分区出现错误的解决办法(转载)
- VMware虚拟机CentOS6.3出现yum安装出错
- Thinkpad VMware 安装虚拟机出现此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态(问题解决方法)
- 安装虚拟机VMWare时出现1021错误的解决办法
- VMware虚拟机创建安装之后不出现VMnet1和VMnet8虚拟网卡
- vmware虚拟机上安装红旗LINUX时硬盘分区出现错误的解决办法(转载)