依赖项失败:从 rpm 安装 openssl 时出错

Failed dependencies: error when installing openssl from rpm

我需要升级我的 openssl(我当前的版本是 OpenSSL 1.0.1e-fips 11 Feb 2013 ).我的盒子没有连接到互联网。所以我下载 Openssl rpm 并执行

rpm -Uvh openssl-1.0.1e-40.fc20.x86_64.rpm

命令。然后我得到以下错误。

warning: openssl-1.0.1e-40.fc20.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 246110c1: NOKEY
error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libc.so.6(GLIBC_2.15)(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libcrypto.so.10()(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libcrypto.so.10(OPENSSL_1.0.1)(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libcrypto.so.10(libcrypto.so.10)(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libssl.so.10()(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
libssl.so.10(libssl.so.10)(64bit) is needed by openssl-1:1.0.1e-40.fc20.x86_64
openssl-libs(x86-64) = 1:1.0.1e-40.fc20 is needed by openssl-1:1.0.1e-40.fc20.x86_64
libcrypto.so.10()(64bit) is needed by (installed) qt-1:4.6.2-26.el6_4.x86_64
libcrypto.so.10()(64bit) is needed by (installed) libssh2-1.4.2-1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) wget-1.12-1.8.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) bind-libs-32:9.8.2-0.17.rc1.el6_4.6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) bind-utils-32:9.8.2-0.17.rc1.el6_4.6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) mysql-libs-5.1.71-1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) fipscheck-1.2.0-7.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) python-libs-2.6.6-51.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) m2crypto-0.20.2-9.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) pyOpenSSL-0.10-2.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) python-ldap-0:2.3.10-1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) openssh-5.3p1-94.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) ntpdate-4.2.6p5-1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) ntp-4.2.6p5-1.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) certmonger-0.61-3.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) cyrus-sasl-2.1.23-13.el6_3.1.x86_64
libcrypto.so.10()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
libcrypto.so.10()(64bit) is needed by (installed) openssh-clients-5.3p1-94.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) openssh-server-5.3p1-94.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) tcpdump-14:4.0.0-3.20090921gitdf3cb4.2.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) perl-Crypt-SSLeay-0.57-16.el6.x86_64
libcrypto.so.10()(64bit) is needed by (installed) nginx-1.6.2-1.el6.ngx.x86_64
libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit) is needed by (installed) nginx-1.6.2-1.el6.ngx.x86_64
libcrypto.so.10(libcrypto.so.10)(64bit) is needed by (installed) nginx-1.6.2-1.el6.ngx.x86_64
libssl.so.10()(64bit) is needed by (installed) qt-1:4.6.2-26.el6_4.x86_64
libssl.so.10()(64bit) is needed by (installed) libssh2-1.4.2-1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) wget-1.12-1.8.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) mysql-libs-5.1.71-1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) python-libs-2.6.6-51.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) m2crypto-0.20.2-9.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) pyOpenSSL-0.10-2.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) python-rhsm-1.9.6-1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) python-ldap-0:2.3.10-1.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64
libssl.so.10()(64bit) is needed by (installed) perl-Crypt-SSLeay-0.57-16.el6.x86_64
libssl.so.10()(64bit) is needed by (installed) nginx-1.6.2-1.el6.ngx.x86_64
libssl.so.10(libssl.so.10)(64bit) is needed by (installed) nginx-1.6.2-1.el6.ngx.x86_64

我理解这是与依赖项的冲突。有什么方法可以让我在离线模式下更新我的 openssl?

您必须满足升级会破坏的所有依赖项。

由于显然所有提到的软件包都需要 libcrypto 的特定版本,而您尝试安装的 rpm 中似乎又不存在该版本,因此只剩下一个解决方案:您必须将 所有 这些软件包升级到自己接受较新 openSSL 版本的版本。

这是通常称为 "dependency hell" 的典型示例,您可以 运行 使用像 rpm 这样的依赖性感知软件管理系统。虽然这种情况确实看起来很烦人,但这是有充分理由的,而且没有真正的解决办法。 rpm 命令提供了一个 "force" 选项来安装该软件包,尽管出现了所有这些失败的依赖项警告。但最终所有这些包 都会被破坏 ,所以这样的安装或多或少会破坏你的系统。所以这不是一个选择。

可以 尝试收集越来越多的软件包并将它们与 openSSL 软件包一起离线安装。但那是一项非常繁琐的工作。帮自己一个忙,以某种方式 为该任务建立临时互联网连接。然后包管理系统可以自己整理所有这些依赖关系。


实际上我想到还有一个选择:

您可以在 具有 Internet 连接的某个其他系统上本地镜像在该目标系统内配置的存储库。这意味着您必须同步(下载)该存储库中的 all 包以及层次结构,并设置一个可以从目标系统访问的本地存储库服务器。这样您就可以在本地使用该存储库作为包源,并具有自动依赖项解析的所有优点。但是 无需 设置互联网连接。您所需要的只是与提供镜像存储库的系统的网络连接。而且您必须更改目标系统上的包管理配置,以使用本地镜像而不是远程镜像。

您还可以通过定期(每日)同步来保持本地镜像服务。这是许多公司实际为减少网络流量所做的事情。这样,本地镜像就有点像本地系统的包代理。

存储库镜像是一个有据可查的策略。您会找到与您的发行版相匹配的详细说明。


还有一个想法::-)

如果您的问题不是您不能/不想为该目标系统设置互联网连接,而是您无法设置 任何 网络连接,则再次有一个选项:

您可以像上面提到的那样创建一个版本库镜像,但是将它存储在本地磁盘上。例如 USB 硬盘驱动器。这样您就可以将该存储库附加并安装到目标系统上的本地文件系统中,并配置您的包管理,以便它使用该本地副本作为存储库。这样,您在目标系统上根本不需要网络连接。