./a.out: error while loading shared libraries: libcjson.so.1: cannot open shared object file: No suc
问题用自己的库编写程序运行时报错:./a.out: error while loading shared libraries: libcjson.so.1: cannot open shared object file: No such file or directory分析原因:链接器ld提示找不到库文件。ld默认的目录是/lib和/usr/lib,如果放在其他路径也可以,需要让ld知道库文件所在的路径。找不到这个动态库,解决方法:# vim /etc/ld.so.conf //在
原创
2020-07-04 20:40:13 ·
2524 阅读 ·
0 评论