客户有台机器装的是红帽,但不想用官方的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]#
这下就好了。
分享到:
相关推荐
Font Awesome图标字体库提供可缩放矢量图标,它可以被定制大小、颜色、阴影以及任何可以用CSS的样式
介绍了physical design的floorplanning问题
数学建模培训资料 数学建模实战题目真题答案解析解题过程&论文报告 最低生活保障问题的探索 共20页.pdf
变更用水性质定额申请表.xls
从官网上下载下来,作为资源存储,方便安装,此资源为windows版本
嗨玩旅游网站-JAVA-基于springboot嗨玩旅游网站设计与实现(毕业论文+PPT)
【资源说明】 本科毕业设计 基于Python中国知网(cnki)爬虫及数据可视化详细文档+全部资料.zip 【备注】 1、该项目是个人高分项目源码,已获导师指导认可通过,答辩评审分达到95分 2、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 3、本项目适合计算机相关专业(人工智能、通信工程、自动化、电子信息、物联网等)的在校学生、老师或者企业员工下载使用,也可作为毕业设计、课程设计、作业、项目初期立项演示等,当然也适合小白学习进阶。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 欢迎下载,沟通交流,互相学习,共同进步!
api代码
【作品名称】:基于 Java 实现的24点卡牌游戏【课程设计】 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。 【项目介绍】: Java小游戏--24点卡牌游戏 将扑克牌(除大小王)随机打乱,每次出现4张卡牌,每张卡牌使用一次,13个回合。 A代表1,J代表11,Q代表12,K代表13。 可2-4人局域网同时在线对战,100秒倒计时结束前回答正确可获得积分,先回答的可获4分,后回答的分数依次递减。 实时显示玩家排名。 【资源声明】:本资源作为“参考资料”而不是“定制需求”,代码只能作为参考,不能完全复制照搬。需要有一定的基础看懂代码,自行调试代码并解决报错,能自行添加功能修改代码。
用 Python 实现的可扩展布隆过滤器皮布卢姆pybloom是一个包含 Bloom Filter 数据结构以及可扩展 Bloom Filter 实现的模块,如下所述P. Almeida、C.Baquero、N. Preguiça、D. Hutchison,可扩展布隆过滤器,(GLOBECOM 2007),IEEE,2007。如果您了解需要提前留出多少位来存储整个集合,那么布隆过滤器就是您的不二之选。可扩展布隆过滤器允许您的布隆过滤器位根据误报概率和大小进行增长。当过滤器达到容量上限时,即为“满”M * ((ln 2 ^ 2) / abs(ln p)),其中 M 是位数,p 是误报概率。当达到容量上限时,将创建一个比上一个过滤器大得多的新过滤器,其误报概率更小,哈希函数数量更多。>>> from pybloom import BloomFilter>>> f = BloomFilter(capacity=1000, error_rate=0.001)>>> [f.add(x) for x in range(10)][False, False, False,
计算机学院宿舍美化大赛.rar
基于java的运动器械购物商城设计与实现.docx
内容概要:文章介绍了针对“卓越工程师教育培养计划”,结合PBL和CDIO工程教育理念,对材料成型及控制工程专业课程设计的实践教学改革进行探索。首先在命题设计上依托企业实践项目,确保设计内容与生产实际紧密结合,具有较强的创新性和实用性。在过程管理中,采用分组合作和面向实际问题导向的教学方法,提升学生的工程素养和创新思维。通过课程设计的成绩考核,结合校内外导师的共同评价,客观全面衡量学生的学习成果。指导教师发挥了组织、支持和引导等多方面的角色作用。 适合人群:高等院校材料成型及控制工程专业学生和教学管理人员;工程教育领域的研究人员。 使用场景及目标:旨在提升工科学生的工程实践能力和创新能力,使其具备解决复杂实际工程问题的能力。通过改革教学内容和方法,改善传统课程设计中存在的不足,培养出高素质的技术人才。 其他说明:改革措施在实际运行中取得了较好的教学效果,提高了学生的就业竞争力,但仍存在一些不足之处需要在未来进行完善。
设计模式学习
C的两数相加求和的程序代码
Viper是一个基于Anno微服务引擎开发的Dashboard示例项目。Anno底层通讯采用grpc、thrift
本教程播放列表涵盖了 Python 中的数据结构和算法。每个教程都有数据结构或算法背后的理论、BIG O 复杂性分析和可供练习的练习。使用 Python 的数据结构和算法本教程涵盖了 Python 中的数据结构和算法。每个教程都包含数据结构或算法背后的理论、BIG O 复杂度分析以及可供练习的练习。要观看视频,您可以访问播放列表https://www.youtube.com/playlist?list=PLeo1K3hjS3uu_n_a__MI_KktGTLYopZ12订阅 codebasics youtube 频道https://www.youtube.com/c/codebasics
python入门——安装Python软件包
就业去向信息-JAVA-基于微信小程序高校毕业生实习及就业去向信息管理系统(毕业论文+PPT)
基于java的学费管理系统设计与实现.docx