CentOS Ruby 安装-Open SSL 问题

CentOS Ruby 安装-Open SSL 问题

尝试在 centos 7 机器上安装 ruby​​ 2.1.2,但遇到了 openssl 依赖问题

~ % ruby-install ruby

...blah blah blah...

---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-devel-1.0.1e-34.el7.x86_64
---> Package pcre-devel.x86_64 0:8.32-12.el7 will be installed
--> Finished Dependency Resolution
Error: Package: 1:openssl-devel-1.0.1e-34.el7.x86_64 (base)
           Requires: openssl-libs(x86-64) = 1:1.0.1e-34.el7
           Installed: 1:openssl-libs-1.0.1e-34.el7_0.3.x86_64 (@updates)
               openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.3
           Available: 1:openssl-libs-1.0.1e-34.el7.x86_64 (base)
               openssl-libs(x86-64) = 1:1.0.1e-34.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
!!! Installing dependencies failed!

疯狂的是,看起来我已经有了想要的包:

~ % yum list installed |grep ssl
openssl.x86_64                  1:1.0.1e-34.el7_0.3                    @updates
openssl-libs.x86_64             1:1.0.1e-34.el7_0.3                    @updates

我该怎么做才能满足 SSL 依赖性?

接下来我尝试:

~ % yum install -y openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: sg2plmirror02.shr.prod.sin2.secureserver.net
 * epel: mirrors.mit.edu
 * extras: sg2plmirror02.shr.prod.sin2.secureserver.net
 * rpmforge: mirror.us.leaseweb.net
 * update: sg2plmirror02.shr.prod.sin2.secureserver.net
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-devel-1.0.1e-34.el7.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.1e-34.el7.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.11.3-49.el7 will be installed
--> Processing Dependency: libverto-devel for package: krb5-devel-1.11.3-49.el7.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.11.3-49.el7.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.11.3-49.el7.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.11.3-49.el7.x86_64
---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-devel-1.0.1e-34.el7.x86_64
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package libcom_err-devel.x86_64 0:1.42.9-4.el7 will be installed
---> Package libselinux-devel.x86_64 0:2.2.2-6.el7 will be installed
--> Processing Dependency: libsepol-devel >= 2.1.9-1 for package: libselinux-devel-2.2.2-6.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.2.2-6.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.2.2-6.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-devel-1.0.1e-34.el7.x86_64
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.1.9-3.el7 will be installed
---> Package openssl-devel.x86_64 1:1.0.1e-34.el7 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7 for package: 1:openssl-devel-1.0.1e-34.el7.x86_64
---> Package pcre-devel.x86_64 0:8.32-12.el7 will be installed
--> Finished Dependency Resolution
Error: Package: 1:openssl-devel-1.0.1e-34.el7.x86_64 (base)
           Requires: openssl-libs(x86-64) = 1:1.0.1e-34.el7
           Installed: 1:openssl-libs-1.0.1e-34.el7_0.3.x86_64 (@updates)
               openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.3
           Available: 1:openssl-libs-1.0.1e-34.el7.x86_64 (base)
               openssl-libs(x86-64) = 1:1.0.1e-34.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

错误信息非常模糊。

答案1

看着:

Package: 1:openssl-devel-1.0.1e-34.el7.x86_64 (base)

,我记得CentOS-Base.repo在设置我的盒子时修改了文件以包含其他镜像以及一些其他更改。不幸的是,我不确定是什么更改触发了错误。

我能够通过恢复/etc/yum.repos.d/CentOS-Base.repo到这里找到的文件来解决该问题:http://vault.centos.org/4.2/CentOS-Base.repo并运行yum install openssl

相关内容