红联Linux门户
Linux帮助

redhat使用centos软件源的问题

发布时间:2015-12-23 16:35:40来源:红联作者:nick2000xp
redhat再虚拟机安装成功,然后项配置centos的软件源,参考了网上贴,使用163的软件源,一步一步操作,yum 安装提示

1,yum组件
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm ,
2,进行安装yum
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm um-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

3,vi /etc/yum.repos.d/rhel-debuginfo.repo

内容为:

[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6.0/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6.0/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6.0/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6.0/centosplus/$basearch/
gpgcheck=1
enabled=0

4、yum clean all

5、yum install vim


[root@zhangsy yum.repos.d]# yum install vim
已加载插件:fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
设置安装进程
Determining fastest mirrors
http://mirrors.163.com/centos/6.0/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
尝试其他镜像。
错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

求答案为啥报错了?
文章评论

共有 4 条评论

  1. 看时间飞逝 于 2016-01-13 11:41:16发表:

    我对Linux一窍不通。。。谢谢我对Linux一窍不通。。。谢谢

  2. wpaccp 于 2016-01-04 22:07:47发表:

    学习了,

  3. 唔新 于 2015-12-26 10:56:46发表:

    支持楼上

  4. nick2000xp 于 2015-12-24 10:05:56发表:

    奶奶的,路径错了,baseurl=http://mirrors.163.com/centos/6.0/os/$basearch/,把文件里路径6.0,全部修改位6,就OK了!