一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误,
比如:
error while loading shared libraries: libxxx.so: cannot open shared object file: No such file or directory

原因一般有两个,

一个是操作系统里确实没有包含该共享库(lib*.so.*文件)或者共享库版本不对, 遇到这种情况重新下载并安装上即可.
另外一个原因就是已经安装了该共享库, 但执行需要调用该共享库的程序的时候, 程序按照默认共享库路径找不到该共享库文件.

解决方案:

1.检查系统路径(/usr/lib64或者/lib64)下是否有该文件
2.通过ldd命令检查当前so文件依赖的动态库是否都能找到
3.如果共享库文件安装到了/usr/local/lib目录下, 那么需执行一下ldconfig命令

说明:ldconfig命令的用途, 主要是在默认搜寻目录(/lib和/usr/lib)以及动态库配置文件/etc/ld.so.conf内所列的目录下,
搜索出可共享的动态链接库(格式如lib*.so*), 进而创建出动态装入程序(ld.so)所需的连接和缓存文件.
缓存文件默认为/etc/ld.so.cache, 此文件保存已排好序的动态链接库名字列表.

cannot open shared object file: No such file or directory的更多相关文章

  1. python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

    安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...

  2. error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

    zabbix3.2启动有如下报错: # service zabbix_server startStarting zabbix_server:  /home/zabbix-server/sbin/zab ...

  3. 错误解决:error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

    执行以下代码,生成唯一的UID $fp = popen("/xxx/bin/tools/uuidgen system", "r");// $uid = frea ...

  4. 【转】error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

    错误信息: /usr/local/memcacheq/bin/memcacheq: error while loading shared libraries: libevent-2.0.so.5: c ...

  5. 解决openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory错误

    问题 在Centos7上编译安装openssl后,运行openssl version出现如下错误: openssl: error while loading shared libraries: lib ...

  6. Iptables 报错Couldn't load target `ACCET':/lib64/xtables/libipt_ACCET.so: cannot open shared object file

    [root@xxxx ~]# /etc/init.d/iptables restart iptables: Setting chains to policy ACCEPT: filter nat [ ...

  7. error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file or directory .

    转载:http://www.eefocus.com/pengwr/blog/2012-02/235057_baf52.html 此时你可以locate libXXX.so.x 一下,查看系统里是否有该 ...

  8. Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir

    问题: Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared obje ...

  9. ubuntu解决libstdc++.so.6: cannot open shared object file: No such file or directory:问题

    解决libstdc++.so.6: cannot open shared object file: No such file or directory:原因在于,在13.10 版本中,ia32_lib ...

  10. 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

    运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...

随机推荐

  1. 多臂机测试, AB测试

    bandit  强盗,土匪:恶棍:敲诈者 ['bændɪt] 多臂机 multi-armed bandit MAB  简写. one-arm bandit   tiger ji 是一种自动AB测试的方 ...

  2. c#基础在winform操作数据库,实现增删改查

    1.数据库操作类代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; us ...

  3. luogu P2657 [SCOI2009]windy数 数位dp 记忆化搜索

    题目链接 luogu P2657 [SCOI2009]windy数 题解 我有了一种所有数位dp都能用记忆话搜索水的错觉 代码 #include<cstdio> #include<a ...

  4. 10.30 正睿停课训练 Day12

    目录 2018.10.30 正睿停课训练 Day12 A 强军战歌(DP 树状数组 容斥) B 当那一天来临(思路) C 假如战争今天爆发(贪心) 考试代码 B C 2018.10.30 正睿停课训练 ...

  5. C、C++ 学习经历

    1.可以考虑先学习C. 大多数时候,我们学习语言的目的,不是为了成为一个语言专家,而是希望成为一个解决问题的专家.做一个有用的程序员,做一个赚钱的程序员.我们的价值,将体现在客户价值上,而不是语言写得 ...

  6. 随机查出满足条件的5条数据(tp5)

    随机查出满足条件的5条数据 public function showQuestion() { $data[; $data[ $data['level'] = (int)$data['level']; ...

  7. unity无限循环报错的定位

    晚上遇到了,碰到了程序一运行就卡住的尴尬问题,然后百度下,看了看,Get到了一个新的skill. 1. 打开对应的VS程序,选择“调试/Attach Unity Debuger”菜单来调试代码. 2. ...

  8. 喵哈哈村的魔法考试 Round #8 (Div.2) 题解

    喵哈哈村的美食面馆 签到题,就不停的if就好了. #include<bits/stdc++.h> using namespace std; string name[5]={"ni ...

  9. 数据结构笔记1_求第k个最大者

    参考的文章有: http://www.cnblogs.com/CCBB/archive/2009/06/01/1493971.html http://www.cnblogs.com/zhangchao ...

  10. 基于Material-Design的Gank-IO客户端

    title: 基于Material Design的Gank IO客户端 date: 2017-03-13 12:58:03 tags: - Android - Material Design - Rx ...