error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

 动态库的搜索路径搜索的先后顺序是:

  1.编译目标代码时指定的动态库搜索路径;

  2.环境变量LD_LIBRARY_PATH指定的动态库搜索路径; 比如export LD_LIBRARY_PATH=/usr/local/lib(这样就可以加进来了)

  3.配置文件/etc/ld.so.conf中指定的动态库搜索路径;

  4.默认的动态库搜索路径/lib    /usr/lib。

参考文献:https://www.cnblogs.com/Recan/p/6012305.html

原文地址:https://www.cnblogs.com/Stephen-Qin/p/10982533.html

时间: 2024-10-11 11:13:09

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 file or directory

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

error while loading shared libraries: lib******: cannot open shared object file: No such file or directory

程序编译成功后,运行时错误: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory 解决方法: 像libevent这种开源库,编译安装后,一般在/usr/local/lib目录下,可以通过下列命令查找: #whereis libevent-2.0.so.5 libevent-2.0.so: /usr/local/lib/l

error: while loading shared libraries : countlib.so : cannnot open shared object file : No such fil

问题内容: error: while loading shared libraries : countlib.so : cannnot open shared object file : No such file or directory 我们找不到文件 或目录 解决方法: sudo cp countlib.so  /usrr/lib/

./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory

时间: 2014-7-20   11:30 地点: andon 问题: 研究xu库文件的创建,编译-链接通过后,执行文件时./ProjectC 不能打开动态链接库 解决:makefile文件中,库文件 libProjectC.so已经添加到./install中,但还是报错 #lib directory         LIBDIR = -L ./         LIBDIR = -L ../install #lib which the link program need         LIB

java 罕见的依赖报错 jstat: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

java 都用了N长时间了,突然,意外地发现有一个依赖的so文件从来没找见过 # ldd /usr/bin/java linux-vdso.so.1 =>  (0x00007fffba769000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00000038c4000000) libjli.so => not found libdl.so.2 => /lib64/libdl.so.2 (0x0000003da7c00000) libc

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

出现这个问题的原因是运行程序缺少依赖库,或者运行程序的依赖库缺少依赖库,可能你的本地目录下面就有这个库文件,但是linux搜索路劲不会从当前路径下去搜索:这种情况可能出现在切换环境上,可能你在一个linux环境下运行正常,到另外一个linux下运行则不正常,因为两个系统环境的系统库文件不一样:新环境下缺少系统依赖库: 该问题的解决方有: 1.最简单的方法当然是找出新环境下缺少的系统库文件,可以用ldd -r 程序名称   命令来查看缺少哪些库文件:然后在旧环境中去找到这些库文件,将文件复制到对应

error while loading shared libraries: libjli.so 问题解决

问题描述: 执行jar命令,javac命令执行报错 javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory jar: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or director

【MySQL案例】tpcc--执行tpcc_load报错error while loading shared libraries: libperconaserverclient.s

[报错信息] 针对mysql官方社区版进行测试的时候,执行tpcc_load脚本提示缺少libperconaserverclient.so.18库文件: time ./tpcc_load 127.0.0.1 tpcc1000 root"" 500 ./tpcc_load: error while loading sharedlibraries: libperconaserverclient.so.18: cannot open shared object file: Nosuch fi

Position Independent Code (PIC) in shared libraries【转载】

I've described the need for special handling of shared libraries while loading them into the process's address space in a previous article. Briefly, when the linker creates a shared library, it doesn't know in advance where it might be loaded. This c