./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
         LIBS = $(LIBDIR) -l$(PROJECT)
         LIBS += -lpthread
         LIBS += -lProjectA

最后发现是/etc/ld.so.conf中未添加路径/root/workspace/Project/install

include ld.so.conf.d/*.conf
         /usr/local/lib
         /root/workspace/Project/install

添加路径后,shell:ldconfig

重新编译即可成功

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

时间: 2024-11-04 10:15:44

./ProjectC: error while loading shared libraries: libProjectC.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 : 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/

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: 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://

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

cannot open shared object file: No such file or directory

一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如:error while loading shared libraries: libxxx.so: cannot open shared object file: No such file or directory 原因一般有两个, 一个是操作系统里确实没有包含该共享库(lib*.so.*文件)或者共享库版本不对, 遇到这种情况重新下载并安装上即可.另外一个原因就是已经安装了该共享库, 但执行需要调用该共享库的程序的