- 积分
- 2
- 威望
-
- 金钱
-
- 注册时间
- 2012-5-7
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2012-5-8 12:35:04
|
显示全部楼层
军哥,按照你的方法做了一遍,好像有个xml跟新找不到,失败了,显示404,我看了下,路劲中少了个i386
流程如下:
[root@localhost ~]# wget http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
--2012-05-08 12:26:43-- http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
正在解析主机 mirrors.kernel.org... wget http://mirrors.kernel.org/centos ... i386.rpm149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1034902 (1011K) [application/x-rpm]
Saving to: `yum-3.2.22-39.el5.centos.noarch.rpm'
100%[==========================================>] 1,034,902 247K/s in 4.5s
2012-05-08 12:26:58 (223 KB/s) - `yum-3.2.22-39.el5.centos.noarch.rpm' saved [1034902/1034902]
[root@localhost ~]# wget http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
--2012-05-08 12:26:58-- http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
正在解析主机 mirrors.kernel.org... 149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:21033 (21K) [application/x-rpm]
Saving to: `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm'
100%[==========================================>] 21,033 66.5K/s in 0.3s
2012-05-08 12:27:09 (66.5 KB/s) - `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm' saved [21033/21033]
[root@localhost ~]# wget http://mirrors.kernel.org/centos ... el5.centos.i386.rpm
--2012-05-08 12:27:44-- http://mirrors.kernel.org/centos ... el5.centos.i386.rpm
正在解析主机 mirrors.kernel.org... 149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:26053 (25K) [application/x-rpm]
Saving to: `yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm'
100%[==========================================>] 26,053 78.7K/s in 0.3s
2012-05-08 12:27:55 (78.7 KB/s) - `yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm' saved [26053/26053]
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
[root@localhost ~]# rpm -ivh yum-*
warning: yum-3.2.22-39.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
[root@localhost ~]# cat >/etc/yum.repos.d/CentOS-Base.repo<<eof
> [base]
> name=CentOS-5 - Base
> baseurl=http://mirrors.kernel.org/centos/5/os/$basearch/
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #released updates
> [update]
> name=CentOS-5 - Updates
> baseurl=http://mirrors.kernel.org/centos/5/updates/$basearch/
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #packages used/produced in the build but not released
> [addons]
> name=CentOS-5 - Addons
> baseurl=http://mirrors.kernel.org/centos/5/addons/$basearch/
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
> #additional packages that may be useful
> [extras]
> name=CentOS-5 - Extras
> baseurl=http://mirrors.kernel.org/centos/5/extras/$basearch/
[contrib]
name=CentOS-5 - Contrib
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://mirrors.kernel.org/centos/5/testing/$basearch/
>
> #additional packages that extend functionality of existing packages
> [centosplus]
> name=CentOS-5 - Plus
> baseurl=http://mirrors.kernel.org/centos/5/centosplus/$basearch/
> gpgcheck=1
> enabled=0
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #contrib - packages by Centos Users
> [contrib]
> name=CentOS-5 - Contrib
> baseurl=http://mirrors.kernel.org/centos/5/contrib/$basearch/
> gpgcheck=1
> enabled=0
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #packages in testing
> [testing]
> name=CentOS-5 - Testing
> baseurl=http://mirrors.kernel.org/centos/5/testing/$basearch/
> gpgcheck=1
> enabled=0
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
> eof
[root@localhost ~]# yum makecache
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository update is listed more than once in the configuration
Loading mirror speeds from cached hostfile
http://mirrors.kernel.org/centos/5/addons//repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost ~]# yum install libjpeg libjpeg-devel
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository update is listed more than once in the configuration
Loading mirror speeds from cached hostfile
http://mirrors.kernel.org/centos/5/addons//repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
[root@localhost ~]# |
|