缺少动态链接库: libthrift-0.9.3.so: cannot open shared object file: No such file or directory
来源:互联网 发布:工艺流程软件软件 编辑:程序博客网 时间:2024/04/28 04:28
[root@localhost gen-cpp]# ./CppServer
./CppServer: error while loading shared libraries: libthrift-0.9.3.so: cannot open shared object file: No such file or directory
[root@localhost gen-cpp]# ldd CppServer
linux-vdso.so.1 => (0x00007ffcd4181000)
libthrift-0.9.3.so => not found
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f7a547ef000)
libm.so.6 => /lib64/libm.so.6 (0x00007f7a544ed000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f7a542d7000)
libc.so.6 => /lib64/libc.so.6 (0x00007f7a53f15000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7a53cf9000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7a54b21000)
临时解决方法:
[root@localhost gen-cpp]# export LD_LIBRARY_PATH=/usr/local/lib
LD_LIBRARY_PATH: 动态库的查找路径
主要有3种方法:
方法一:用ln将需要的so文件链接到/usr/lib或者/lib这两个默认的目录下边
ln -s /where/lib/xxx.so.x /usr/lib/xxx.so
sudo ldconfig
方法二:修改LD_LIBRARY_PATH
临时修改方法: export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/XXX 但是登出后就失效
彻底修改方法: 修改~/.bashrc或~/.bash_profile或系统级别的/etc/profile
1. 在其中添加例如export PATH=/where/lib/:$LD_LIBRARY_PATH
2. source .bashrc (使生效)
方法三:修改/etc/ld.so.conf,然后刷新,好处是比较不受用户的限制
这个没有修改LD_LIBRARY_PATH但是效果是一样的实现动态库的查找,
1. /etc/ld.so.conf下面加一行/usr/local/mysql/lib
2. ldconfig
参考:
http://stackoverflow.com/questions/23991830/libthrift-0-9-1-so-cannot-open-shared-object-file-no-such-file-or-directory
http://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux%22
0 0
- 缺少动态链接库: libthrift-0.9.3.so: cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- linux 缺少动态连接库.so--cannot open shared object file: No such file or directory
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- APP上架审核被拒(新增2016.04)
- 嵌套json解析
- 使用ABBYY FineReader 12的那些心得体会
- 【CodeForces 618B】Guess the Permutation(水题)
- SOLR安装简单配置
- 缺少动态链接库: libthrift-0.9.3.so: cannot open shared object file: No such file or directory
- 关于解耦 分布式部署 架构 设计模式的疑问
- oracle的常用函数 instr() 和substr()函数
- 关于<s:iterator/>标签
- JAVA--备忘录模式(Memento)--设计模式十九
- C#中params关键字的作用理解
- Cookie(甜饼)
- Oracle的同义词
- MySql的flush用法