c - libcjson.so : cannot open shared object file: No such file or directory

标签 c linux

我的操作系统是Centos 7

当我运行 ldconfig -p 时,我可以看到“libcjson.so.1.5.7 (libc6,x86-64) =>/lib/libcjson.so.1.5.7”

然后我运行我的程序,它打印出

"libcjson.so: cannot open shared object file: No such file or directory"

最佳答案

最后,我发现ldconfig默认路径是/usr/lib,但是我的动态库在/usr/本地/库。所以我将此路径添加到 ldconfig 的配置中。

当我们复制库时,我们应该得到一些库只是符号链接(symbolic link)。复制到某处后无法正常使用。

关于c - libcjson.so : cannot open shared object file: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45708594/

相关文章:

c - 通过 libCurl 发送电子邮件 (C)

c - 矩阵、指针、C*

linux - fork: retry: 资源暂时不可用

linux - 选择一行时在awk中有条件

XAMPP Windows 上的 Php Cron 作业

linux - 如何将输出命令 telnet 放入文件中

c - 如何为堆栈内存中的二维数组赋值?

c - 最大尺寸方子矩阵

C - 字符串数组的长度

linux - epoll:指定EPOLLONESHOT时电平触发和边沿触发的区别