缺少动态连接库的解决方法

缺少动态连接库.so--cannot open shared object file: No such file or directory

问题报错
error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
====================================================
 总结下来主要有3种方法:
1. 用ln将需要的so文件链接到/usr/lib或者/lib这两个默认的目录下边
ln -s /where/you/install/lib/*.so /usr/lib
sudo ldconfig
 
2.修改LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/where/you/install/lib:$LD_LIBRARY_PATH
sudo ldconfig
 
3.修改/etc/ld.so.conf,然后刷新
vim /etc/ld.so.conf
add /where/you/install/lib
sudo ldconfig
 
4.如果
cmj@cmjUb:~/codes$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
可以在cd /etc/ld.so.conf.d/目录下添加*.conf文件,配置你的动态库所在的位置 
然后执行sudo ldconfig 

 

转载于:https://www.cnblogs.com/cmingjian/p/6259797.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值