报错现象:
[root@mylinux]# rpm -ivh TIVsm-BA.x86_64.rpm
error: Failed dependencies:
libc.so.6 is needed by TIVsm-BA-6.3.0-5.x86_64
解决办法:
出这个问题的原因是因为缺少glibc的32位rpm包,所以只需要补充安装上就可以了。但是需要注意的是,这个包也是与其他包关联的,所以需要用yum方式安装。
分析问题过程:
1、追踪
libc.so.6
[root@TSMClt Client-v641]# find /tmp/TSMClient/Client-v641 -name "libc.so*"
[root@TSMClt Client-v641]#
[root@TSMClt Client-v641]#
[root@TSMClt Client-v641]#
[root@TSMClt Client-v641]# ls -al /lib64/libc.so.6
lrwxrwxrwx. 1 root root 12 Dec 20 00:13 /lib64/libc.so.6 -> libc-2.12.so
[root@TSMClt Client-v641]# rpm -qf /lib64/libc.so.6
glibc-2.12-1.7.el6.x86_64
我们从这里知道了这个包是属于glibc这个package,这是个转折点。
[root@TSMClt Client-v641]# rpm -qa | grep glibc
glibc-devel-2.12-1.7.el6.x86_64
glibc-2.12-1.7.el6.x86_64
glibc-common-2.12-1.7.el6.x86_64
glibc-headers-2.12-1.7.el6.x86_64
[root@TSMClt Client-v641]# yum search -y glibc
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
============================================ Matched: glibc =============================================
glibc-common.x86_64 : Common binaries and locale data for glibc
glibc.i686 : The GNU libc libraries
glibc.x86_64 : The GNU libc libraries
glibc-devel.i686 : Object files for development using standard C libraries.
glibc-devel.x86_64 : Object files for development using standard C libraries.
glibc-headers.x86_64 : Header files for development using standard C libraries.
glibc-utils.x86_64 : Development utilities from GNU C library
compat-glibc-headers.x86_64 : Header files for development using standard C libraries.
kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc
compat-glibc.x86_64 : Compatibility C library
latrace.i686 : LD_AUDIT feature frontend for glibc 2.4+
latrace.x86_64 : LD_AUDIT feature frontend for glibc 2.4+
nscd.x86_64 : A Name Service Caching Daemon (nscd).
nss_db.i686 : An NSS library for the Berkeley DB
nss_db.x86_64 : An NSS library for the Berkeley DB
plpa-libs.i686 : Portable Linux Processor Affinity Libraries
plpa-libs.x86_64 : Portable Linux Processor Affinity Libraries
yp-tools.x86_64 : NIS (or YP) client programs
yum-plugin-protect-packages.noarch : Yum plugin to prevents Yum from removing itself and other protected
: packages
我们注意蓝色字体的内容,上下对比一下,我们看到了吧,问题的关键就是缺少这个i686的32位包。说明glibc这个package安装不完全。
2、32位包不默认不安装的改进方法
In Red Hat Enterprise Linux 5, if a package was available for both the main and the compatibility architectures, both architectures of the package were installed by default. In Red Hat Enterprise Linux 6, only the package for the primary architecture is installed by default.
To avoid problems during the backup-archive client and API installation on a 64-bit machine, be sure to install libstdc++ and compat-libstdc++ packages for 32-bit as well."
64位CentOS 6 通过yum安装软件的时候,默认不会安装32位的软件,这样会导致某些软件无法安装成功,实际上yum仓库里是有32位软件的,只是它默认只安装64位软件,如果需要安装32位,有2个方法,
假设你要安装libjpeg的32位版本
方法1:
先查询
yum list |grep libjpeg
指定安装32位版
yum install libjpeg.i686
方法2:
这是一种改进,一劳永逸的方法,如果作为系统管理员,这个可以提高工作效率,但是也需要评估风险,是否有64位持续不允许安装32位包的?
echo 'multilib_policy=all' >> /etc/yum.conf
以下命令会同时安装32位和64位版
yum install libjpeg
参考资料2:http://www-01.ibm.com/support/docview.wss?uid=swg21608859
___________________________________________________________________________________
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Author: laven54 (lurou)
Email: laven54@163.com
Blog: http://blog.csdn.net/laven54