无法在 Centos 6.4 上更新 OpenSSL

无法在 Centos 6.4 上更新 OpenSSL

我有一个 Centos 6.4 系统,我正在尝试为其修补 OpenSSL。目前,yum 报告“1.0.1e-16.el6_5.4”,openssl 版本显示“1.0.1e-fips”。在我的 Ubuntu 机器上,我能够使用 apt 非常轻松地更新 openssl,但是如果我尝试“yum update openssl”(甚至只是“yum update”),我会得到响应“没有标记为更新的软件包”。这对我来说似乎不太可能。

我该如何更新这台机器?

更新:

$ sudo python -c 'import yum, pprint; yb=yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'
Loading "rhnplugin" plugin
Loading "product-id" plugin
Loading "refresh-packagekit" plugin
Not loading "subscription-manager" plugin, as it is disabled
Config time: 0.042
Running "init" handler for "rhnplugin" plugin
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:
Name or service not known
{'arch': 'ia32e',
 'basearch': 'x86_64',
 'releasever': '6Workstation',
 'uuid': '<< something valid looking >>'}

当我在这里添加一个存储库后,它进行了一系列巨大的更新。不幸的是,即使重新启动后:

$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

并且yum update openssl仍然显示“没有标记为更新的软件包”,并yum list openssl返回

Installed Packages
openssl.x86_64                    1.0.1e-42.el6_7.4                     @updates
Available Packages
openssl.i686                      1.0.1e-42.el6_7.4                     updates 

答案1

您似乎没有任何 CentOS 存储库的设置,或者至少没有任何有效的设置。您可以通过运行来确认这一点yum repolist。如果“存储库 ID”和/或“存储库名称”下没有出现任何条目,则肯定没有存储库设置。

纠正该问题的一种简单方法是使用yum-config-manager --add-repo=<CentOS repo>.这会自动在 /etc/yum.repos.d/ 下创建一个配置文件

要获得官方 CentOS 存储库,我相信此页面会有所帮助:https://wiki.centos.org/下载

编辑:
这可能是一个更有用的网址:https://www.centos.org/docs/5/html/yum/sn-yum-maintenance.html

这解释了如何安装“最快的镜像”RPM,假设您已连接到互联网,它将为您选择一个镜像。

答案2

yum update openssl问题,我在尝试更新 openssl 时收到以下错误。

Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:

Error Class Code: 6001
Error Class Info:
RHN is in the process of being decommissioned and systems are no longer able to receive updates or make use of any RHN services.
Please see https://access.redhat.com/articles/2979901 for more info.

Setting up Update Process
Could not retrieve mirrorlist https://mirrors.iuscommunity.org/mirrorlist?repo=ius-el6&arch=x86_64&protocol=http error was
14: Peer cert cannot be verified or peer cert invalid
Error: Cannot retrieve repository metadata (repomd.xml) for repository: ius. Please verify its path and try again.

经过几次 RND 后,我得到了错误代码 6001 的解决方案。这是解决该问题的总结:

mv /etc/yum.repos.d/* /tmp/
rm -rf /var/cache/yum/*
yum clean all
yum repolist
yum update openssl
yum list installed openssl

相关内容