如何解决安装 nginx 时出现 Openssl 包错误

如何解决安装 nginx 时出现 Openssl 包错误

我尝试将 nginx 安装在RHEL 7.2机器,我收到一个错误,

Error: Package: 1:nginx-1.10.2-2.el7.x86_64 (epel)
       Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

但这个 libcrypto.so.10(OPENSSL_1.0.2)(64bit) 在默认 openssl 软件包上不可用,因此我删除了当前的 openssl 软件包并使用 rpm 安装,如下所示,

[root@db-brm ~]# rpm -Uvh http://mirror.centos.org/centos/7/os/x86_64/Packages/openssl-libs-1.0.2k-8.el7.x86_64.rpm

我认为这可以解决问题,但事实并非如此,它增加了 openssl 中的冲突,并在安装 nginx 时出现错误,

我可以看到这是错误,

[root@db-brm ~]# yum install nginx
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You 
can use subscription-manager to register.
epel/x86_64/metalink                                                                                                                                       
|  16 kB  00:00:00     
local-repo                                                                                                                                                 
| 4.1 kB  00:00:00     
nginx                                                                                                                                                      
| 2.9 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.12.2-1.el7_4.ngx will be installed
--> Processing Dependency: openssl >= 1.0.2 for package: 1:nginx-1.12.2-1.el7_4.ngx.x86_64
--> Running transaction check
---> Package openssl.x86_64 1:1.0.1e-42.el7_1.9 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.9 for package: 1:openssl-1.0.1e-42.el7_1.9.x86_64
--> Finished Dependency Resolution
Error: Package: 1:openssl-1.0.1e-42.el7_1.9.x86_64 (local-repo)
       Requires: openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.9
       Installed: 1:openssl-libs-1.0.2k-8.el7.x86_64 (installed)
           openssl-libs(x86-64) = 1:1.0.2k-8.el7
       Available: 1:openssl-libs-1.0.1e-42.el7_1.9.x86_64 (local-repo)
           openssl-libs(x86-64) = 1:1.0.1e-42.el7_1.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

谁能帮我解决这个问题?

答案1

看来上一个 nginx 版本存在一些问题。就我而言yum install nginx-1.12.1有帮助

答案2

跑步 yum --showduplicates list nginx

尝试安装其他版本的nginx

对我来说yum install nginx-1.10.1-1.el7有效

相关内容