客户有台机器装的是红帽,但不想用官方的rpm源做更新,并且在yum update的时候,发现出了如下错误:
[root@localhost ~]# yum update
Loading "rhnplugin" plugin
Loading "security" plugin
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 85, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
disabled_plugins=self.optparser._splitArg(opts.disableplugins))
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 183, in
_getConfig
self.plugins.run('init')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 169, in
run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/rhnplugin.py", line 109, in init_hook
login_info = up2dateAuth.getLoginInfo()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 211, in
getLoginInfo
login()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 162, in
login
server = rhnserver.RhnServer()
File "/usr/share/rhn/up2date_client/rhnserver.py", line 147, in
__init__
self._server = rpcServer.getServer()
File "/usr/share/rhn/up2date_client/rpcServer.py", line 168, in
getServer
raise up2dateErrors.SSLCertificateFileNotFound(msg)
up2date_client.up2dateErrors.SSLCertificateFileNotFound: ERROR: can not
find RHNS CA file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
,希望用开源的,找了找"redhat yum配置"的文章,发现这个(http://blog.m6699.com/diomedea/article/29966.html)验证是对的。按照步骤来:
[root@localhost etc]# mv /etc/yum.conf /etc/yum.conf.bak
[root@localhost etc]# vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[base]
name=centos-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/
# the other site: http://centos.candishosting.com.cn/centos/5/os/i386/
# you can find more site in: http://www.centos.org/modules/tinycontent/index.php?id=13
enabled=1
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://mirror.centos.org/centos/5/updates/i386/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://mirror.centos.org/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://mirror.centos.org/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing
packages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://mirror.centos.org/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://mirror.centos.org/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://mirror.centos.org/centos/5/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
但还是发现有原先的错误:
[root@localhost etc]# yum update
Loading "rhnplugin" plugin
Loading "security" plugin
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 85, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
disabled_plugins=self.optparser._splitArg(opts.disableplugins))
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 183, in _getConfig
self.plugins.run('init')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 169, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/rhnplugin.py", line 109, in init_hook
login_info = up2dateAuth.getLoginInfo()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 211, in getLoginInfo
login()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 162, in login
server = rhnserver.RhnServer()
File "/usr/share/rhn/up2date_client/rhnserver.py", line 147, in __init__
self._server = rpcServer.getServer()
File "/usr/share/rhn/up2date_client/rpcServer.py", line 168, in getServer
raise up2dateErrors.SSLCertificateFileNotFound(msg)
up2date_client.up2dateErrors.SSLCertificateFileNotFound: ERROR: can not find RHNS CA file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
执行了下面这个也不行,
[root@localhost etc]# yum clean all
Loading "rhnplugin" plugin
Loading "security" plugin
Cleaning up Everything
[root@localhost etc]# yum install system-config-date
Loading "rhnplugin" plugin
Loading "security" plugin
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 85, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
disabled_plugins=self.optparser._splitArg(opts.disableplugins))
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 183, in _getConfig
self.plugins.run('init')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 169, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/rhnplugin.py", line 109, in init_hook
login_info = up2dateAuth.getLoginInfo()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 211, in getLoginInfo
login()
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 162, in login
server = rhnserver.RhnServer()
File "/usr/share/rhn/up2date_client/rhnserver.py", line 147, in __init__
self._server = rpcServer.getServer()
File "/usr/share/rhn/up2date_client/rpcServer.py", line 168, in getServer
raise up2dateErrors.SSLCertificateFileNotFound(msg)
up2date_client.up2dateErrors.SSLCertificateFileNotFound: ERROR: can not find RHNS CA file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
估计是原先的插件的问题,就看了看这个:
[root@localhost etc]# rpm -qa|grep yum
yum-3.2.8-9.el5
yum-updatesd-0.9-2.el5
yum-rhn-plugin-0.5.3-6.el5
yum-metadata-parser-1.1.2-2.el5
yum-security-1.1.10-9.el5
就删除了这个原先系统自带的插件:
[root@localhost etc]# rpm -e yum-rhn-plugin-0.5.3-6.el5
[root@localhost etc]# yum clean all
Loading "security" plugin
Cleaning up Everything
[root@localhost etc]# yum install system-config-date
Loading "security" plugin
update 100% |=========================| 1.9 kB 00:00
primary.sqlite.bz2 100% |=========================| 459 kB 01:26
base 100% |=========================| 2.1 kB 00:00
primary.sqlite.bz2 100% |=========================| 1.6 MB 00:07
addons 100% |=========================| 951 B 00:00
primary.xml.gz 100% |=========================| 201 B 00:00
extras 100% |=========================| 1.1 kB 00:00
primary.xml.gz 100% |=========================| 107 kB 00:07
extras : ################################################## 325/325
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package system-config-date.noarch 0:1.8.12-4.el5.centos set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
system-config-date noarch 1.8.12-4.el5.centos base 1.5 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): system-config-date 100% |=========================| 1.5 MB 00:14
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : system-config-date ######################### [1/2]
Cleanup : system-config-date ######################### [2/2]
Updated: system-config-date.noarch 0:1.8.12-4.el5.centos
Complete!
[root@localhost etc]#
这下就好了。
分享到:
相关推荐
小红薯电商实操课小红书开店实操必学课.mp4
AI图像处理工具包-一键抠图、背景切换、旧照片修复、人像漫画化、视频卡通化(Python+OpenCV+Dlib+TensorFlow).zip [资源说明] 1、该项目是团队成员近期最新开发,代码完整,资料齐全,含设计文档等 2、上传的项目源码经过严格测试,功能完善且能正常运行,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的高校学生、教师、科研工作者、行业从业者下载使用,可借鉴学习,也可直接作为毕业设计、课程设计、作业、项目初期立项演示等,也适合小白学习进阶,遇到问题不懂就问,欢迎交流。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 5、不懂配置和运行,可远程教学 欢迎下载,学习使用!
基于java的新能源充电系统设计与实现.docx
吸波材料建模单元周期仿真模拟,参数优化,计算反射损耗,极化角,入射角,等效阻抗等
AGV调度系统的仿真平台(含源码+项目说明+实验结果分析).zip [资源说明] 1、该项目是团队成员近期最新开发,代码完整,资料齐全,含设计文档等 2、上传的项目源码经过严格测试,功能完善且能正常运行,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的高校学生、教师、科研工作者、行业从业者下载使用,可借鉴学习,也可直接作为毕业设计、课程设计、作业、项目初期立项演示等,也适合小白学习进阶,遇到问题不懂就问,欢迎交流。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 5、不懂配置和运行,可远程教学 欢迎下载,学习使用!
【本体】Internet Download Manager v6.42.26.zip
NLP中文垃圾短信分类系统源码+设计全部资料+文档报告(自然语言处理课设).zip [资源说明] 1、该项目是团队成员近期最新开发,代码完整,资料齐全,含设计文档等 2、上传的项目源码经过严格测试,功能完善且能正常运行,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的高校学生、教师、科研工作者、行业从业者下载使用,可借鉴学习,也可直接作为毕业设计、课程设计、作业、项目初期立项演示等,也适合小白学习进阶,遇到问题不懂就问,欢迎交流。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 5、不懂配置和运行,可远程教学 欢迎下载,学习使用!
Python大作业封面.doc
基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业),个人经导师指导并认可通过的毕业设计项目,评审分98分,项目中的源码都是经过本地编译过可运行的,都经过严格调试,确保可以运行!主要针对计算机相关专业的正在做毕业设计的学生和需要项目实战练习的学习者,资源项目的难度比较适中,内容都是经过助教老师审定过的能够满足学习、使用需求,如果有需要的话可以放心下载使用。 基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开发的安卓的记事本app项目源码(高分期末大作业)基于Android Studio开
操作系统课后题参考答案
几何图霸软件是一个非常强大的三维几何图形绘制工具,可以根据约束条件绘制标准示意图,写相关技术类文章需要绘图时很适用。
《写给大众的健康饮食指南》.mp4
智能相册Piktures v2.19 build 815 for 高级版.mp4
建行开养老金必中58元微信立减金亲测.mp4
Converter视频音频转换器v2.2.5.2解锁VIP版.mp4
车来了v4.59.0高级版 精准实时公交地铁神器.mp4
基于java的招生宣传管理系统设计与实现.docx
iiiicfdfdsffffffffffffffffffff
这是本人期末复习期间的产物,传上来主要是为了方便保存和复习,如有错漏还请谅解。