Problem with ldconfig("not Symbol link" message)

本文探讨了ldconfig工具在处理库文件时遇到的问题及解决方案。当目录中有多个版本的库文件时,ldconfig可能会遇到无法创建正确符号链接的情况。文章提供了两种解决办法:一是确保目录中每个库只有一个版本;二是确保所有库文件名包含版本号。

problem:

/sbin/ldconfig: /usr/local/lib/libxml2.so.5 is not a symbolc link

 

Resolve:

  ldconfig uses the .so ending(with no trailing version numbers) to link to one of multiple libraries. This error is saying that the directory contains multiple versions of this library. However, ldconfig can not create a symbolic link with the appropriate name to one of them because a regular file exists with the name that it would use.

 

 You need either to trim the directory down so it only contains one version of each library or make sure all of the versions have a trailing version number after the .so(eg.. so.0.1)

 

这是从Redhat 的客服或者技术支持摘下来的。其实并不完全正确。

我试过。在/usr/local/lib下,存在如下库:

 

 

libACE_HTBP.so            
libACE_HTBP.so.6          
libACE_HTBP.so.5.4.7

 

运行/sbin/ldconfig后,并不会出错。因为,运行ldconfig后,三个库文件的符号链接分别为:

libACE_HTBP.so            
libACE_HTBP.so.6          
libACE_HTBP.so.5

 

并不是像上面英文提到的,符号链接会把所有后缀去掉。

所以,只要保证so.*.   中,"*"所代表的数字不同就可以了。

 

 

 

P.S 有可能是上面的英文描述,针对的是比较老的redhat版本

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值