Redhat6.6更改网易yum源
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Redhat6.6更改网易yum源相关的知识,希望对你有一定的参考价值。
当前系统版本[[email protected] ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
yum安装软件报错
[[email protected] ~]# yum install -y net-snmp
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
No package net-snmp available.
Error: Nothing to do
查询redhat6 yum相关依赖包
[[email protected] ~]# rpm -qa | grep yum
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-utils-1.1.30-30.el6.noarch
yum-rhn-plugin-0.9.1-50.el6.noarch
yum-plugin-security-1.1.30-30.el6.noarch
yum-3.2.29-60.el6.noarch
卸载redhat6 yum相关依赖包
[[email protected] ~]# rpm -qa | grep yum|xargs rpm -e --nodeps
[[email protected] ~]# rpm -qa | grep yum
[[email protected] ~]#
安装python-iniparse、yum-metadata-parser组件
[[email protected] ~]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
[[email protected] ~]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
python-2.6.6卸载并重新安装
[[email protected] ~]# wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.5/x86_64/updates/security/python-2.6.6-64.el6.x86_64.rpm
[[email protected] ~]# python -V
Python 2.6.6
[[email protected] ~]# rpm -e python-2.6.6-52.el6.x86_64 --nodeps
[[email protected] ~]# rpm -ivh python-libs-2.6.6-66.el6_8.x86_64.rpm python-2.6.6-64.el6.x86_64.rpm --nodeps --force
warning: python-libs-2.6.6-66.el6_8.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
warning: python-2.6.6-64.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
Preparing... ########################################### [100%]
1:python ########################################### [ 50%]
2:python-libs ########################################### [100%]
安装python-urlgrabber组件
[[email protected] ~]# rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm --nodeps --force
warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:python-urlgrabber ########################################### [100%]
安装yum组件
[[email protected] ~]# rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
warning: yum-3.2.29-81.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:yum-plugin-fastestmirro########################################### [ 50%]
2:yum ########################################### [100%]
更换网易centos6镜像,将$releaseserve替换为6[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS6-Base-163.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
#清除原有缓存,重建缓存
[[email protected] ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[[email protected] ~]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
base | 3.7 kB 00:00
base/group_gz | 226 kB 00:00
base/filelists_db | 6.4 MB 01:50
base/primary_db | 4.7 MB 00:11
base/other_db | 2.8 MB 00:09
extras | 3.4 kB 00:00
extras/filelists_db | 26 kB 00:00
extras/prestodelta | 1.3 kB 00:00
extras/primary_db | 29 kB 00:00
extras/other_db | 30 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 3.5 MB 00:04
updates/prestodelta | 171 kB 00:00
updates/primary_db | 5.8 MB 00:21
updates/other_db | 83 MB 04:42
Metadata Cache Created
重新安装net-snmp
[[email protected] ~]# yum install -y net-snmp
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package net-snmp.x86_64 1:5.5-60.el6 will be installed
--> Processing Dependency: net-snmp-libs = 1:5.5-60.el6 for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmptrapd.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmpmibs.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmphelpers.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmpagent.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmp.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Running transaction check
---> Package lm_sensors-libs.x86_64 0:3.1.1-17.el6 will be installed
---> Package net-snmp-libs.x86_64 1:5.5-60.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================
Installing:
net-snmp x86_64 1:5.5-60.el6 base 309 k
Installing for dependencies:
lm_sensors-libs x86_64 3.1.1-17.el6 base 38 k
net-snmp-libs x86_64 1:5.5-60.el6 base 1.5 M
Transaction Summary
===============================================================================================================================================================================
Install 3 Package(s)
Total download size: 1.9 M
Installed size: 6.3 M
Downloading Packages:
(1/3): lm_sensors-libs-3.1.1-17.el6.x86_64.rpm | 38 kB 00:00
(2/3): net-snmp-5.5-60.el6.x86_64.rpm | 309 kB 00:00
(3/3): net-snmp-libs-5.5-60.el6.x86_64.rpm | 1.5 MB 00:02
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 134 kB/s | 1.9 MB 00:14
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]>"
From : http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 4 pre-existing rpmdb problem(s), ‘yum check‘ output follows:
python-2.6.6-64.el6.x86_64 has missing requires of python-libs(x86-64) = (‘0‘, ‘2.6.6‘, ‘64.el6‘)
python-libs-2.6.6-66.el6_8.x86_64 is a duplicate with python-libs-2.6.6-52.el6.x86_64
python-urlgrabber-3.9.1-11.el6.noarch is a duplicate with python-urlgrabber-3.9.1-9.el6.noarch
rhn-check-1.0.0.1-18.el6.noarch has missing requires of yum-rhn-plugin >= (‘0‘, ‘0.9.1‘, ‘35‘)
Installing : lm_sensors-libs-3.1.1-17.el6.x86_64 1/3
Installing : 1:net-snmp-libs-5.5-60.el6.x86_64 2/3
Installing : 1:net-snmp-5.5-60.el6.x86_64 3/3
Verifying : lm_sensors-libs-3.1.1-17.el6.x86_64 1/3
Verifying : 1:net-snmp-libs-5.5-60.el6.x86_64 2/3
Verifying : 1:net-snmp-5.5-60.el6.x86_64 3/3
Installed:
net-snmp.x86_64 1:5.5-60.el6
Dependency Installed:
lm_sensors-libs.x86_64 0:3.1.1-17.el6 net-snmp-libs.x86_64 1:5.5-60.el6
Complete!
以上是关于Redhat6.6更改网易yum源的主要内容,如果未能解决你的问题,请参考以下文章