RedHat 中 glibc 的不同版本

RedHat 中 glibc 的不同版本

在讨论这个问题之前,我使用的是 RedHat 6.5,由于环境限制,无法访问互联网来下载 yum 更新。在这种情况下,我只有 CD ROM(RHEL 6.5)可以使用。更新映像后,我们使用互联网服务器来获取更新,但在此之前,服务器需要能够独立运行。

在图像上我需要使用 ldapsearch,所以我执行了 yum whatprovides */ldapsearch 来确定要安装哪个包。

我收到了:

openldap-clients-2.4.23-32.el6_4.1.x86_64 : LDAP client utilities
Repo        : cdrom
Matched from:
Filename    : /usr/bin/ldapsearch

当我去安装这个包时:

[root@test1 yum.repos.d]# yum install openldap-clients-2.4.23-32.el6_4.1.x86_64
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openldap-clients.x86_64 0:2.4.23-32.el6_4.1 will be installed
--> Processing Dependency: openldap = 2.4.23-32.el6_4.1 for package: openldap-clients-2.4.23-32.el6_4.1.x86_64
--> Running transaction check
---> Package openldap.i686 0:2.4.23-32.el6_4.1 will be installed
--> Processing Dependency: libssl3.so(NSS_3.7.4) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libssl3.so(NSS_3.4) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libssl3.so(NSS_3.2) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libssl3.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libsmime3.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libsasl2.so.2 for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libresolv.so.2(GLIBC_2.2) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libresolv.so.2 for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libplds4.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libplc4.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnssutil3.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.9.3) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.9.2) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.8) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.6) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.4) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.3) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.2) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.12.9) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.12.5) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.12.1) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.12) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.11.1) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.11) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so(NSS_3.10) for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnss3.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libnspr4.so for package: openldap-2.4.23-32.el6_4.1.i686
--> Processing Dependency: libc.so.6(GLIBC_2.4) for package: openldap-2.4.23-32.el6_4.1.i686
--> Running transaction check
---> Package cyrus-sasl-lib.i686 0:2.1.23-13.el6_3.1 will be installed
--> Processing Dependency: libdb-4.7.so for package: cyrus-sasl-lib-2.1.23-13.el6_3.1.i686
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.132.el6.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.132.el6.i686
---> Package nspr.i686 0:4.10.0-1.el6 will be installed
---> Package nss.i686 0:3.15.1-15.el6 will be installed
--> Processing Dependency: nss-softokn(x86-32) >= 3.14.3 for package: nss-3.15.1-15.el6.i686
--> Processing Dependency: libz.so.1 for package: nss-3.15.1-15.el6.i686
--> Processing Dependency: libsoftokn3.so for package: nss-3.15.1-15.el6.i686
---> Package nss-util.i686 0:3.15.1-3.el6 will be installed
--> Running transaction check
---> Package db4.i686 0:4.7.25-18.el6_4 will be installed
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
---> Package nss-softokn.i686 0:3.14.3-9.el6 will be installed
--> Processing Dependency: libsqlite3.so.0 for package: nss-softokn-3.14.3-9.el6.i686
---> Package nss-softokn-freebl.i686 0:3.14.3-9.el6 will be installed
---> Package zlib.i686 0:1.2.3-29.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
---> Package sqlite.i686 0:3.6.20-1.el6 will be installed
--> Processing Dependency: libreadline.so.6 for package: sqlite-3.6.20-1.el6.i686
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
---> Package readline.i686 0:6.0-4.el6 will be installed
--> Processing Dependency: libtinfo.so.5 for package: readline-6.0-4.el6.i686
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
---> Package ncurses-libs.i686 0:5.7-3.20090208.el6 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.12-1.132.el6.i686 (cdrom)
           Requires: glibc-common = 2.12-1.132.el6
           Installed: glibc-common-2.12-1.132.el6_5.2.x86_64 (@updates)
               glibc-common = 2.12-1.132.el6_5.2
           Available: glibc-common-2.12-1.132.el6.x86_64 (cdrom)
               glibc-common = 2.12-1.132.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

看起来我还没有安装适合我的版本的正确软件包:

[root@test1 yum.repos.d]# rpm -qa | grep glibc
glibc-common-2.12-1.132.el6_5.2.x86_64
glibc-2.12-1.132.el6_5.2.x86_64

显然,如果我尝试删除 glibc 并从提供较新版本的 CD-ROM 重新安装,我会收到一大堆错误,因为 glibc 无法被完全删除...

[root@test1 yum.repos.d]# yum install glibc*
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Package matching glibc-2.12-1.132.el6.x86_64 already installed. Checking for update.
Package matching glibc-common-2.12-1.132.el6.x86_64 already installed. Checking for update.
Resolving Dependencies
--> Running transaction check
---> Package glibc-devel.x86_64 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc = 2.12-1.132.el6 for package: glibc-devel-2.12-1.132.el6.x86_64
---> Package glibc-headers.x86_64 0:2.12-1.132.el6 will be installed
---> Package glibc-utils.x86_64 0:2.12-1.132.el6 will be installed
--> Processing Dependency: libgd.so.2()(64bit) for package: glibc-utils-2.12-1.132.el6.x86_64
--> Running transaction check
---> Package gd.x86_64 0:2.0.35-11.el6 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-11.el6.x86_64
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.132.el6.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.132.el6.i686
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
---> Package libXpm.x86_64 0:3.5.10-2.el6 will be installed
---> Package nss-softokn-freebl.i686 0:3.14.3-9.el6 will be installed
--> Finished Dependency Resolution
Error: Package: glibc-2.12-1.132.el6.i686 (cdrom)
           Requires: glibc-common = 2.12-1.132.el6
           Installed: glibc-common-2.12-1.132.el6_5.2.x86_64 (@updates)
               glibc-common = 2.12-1.132.el6_5.2
           Available: glibc-common-2.12-1.132.el6.x86_64 (cdrom)
               glibc-common = 2.12-1.132.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我该怎么做才能删除这个 _5.2 版本的 glibc 并用光盘上可用的较新版本替换它?

相关内容