700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or

error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or

时间:2022-10-04 18:53:07

相关推荐

error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or

原文:/david_xtd/article/details/7625626/

链接时可以通过-L和-l来指定自己的库,因此链接可以通过,但是运行时,系统仍无法找到指定的库,需要简单配置一下。

解决方法:

可以直接在将自己的库所在路径添加到/etc/ld.so.conf文件中。但一般这个文件中的内容都是一句“include /etc/ld.so.conf.d/*.conf”,因此最好在/etc/ld.so.conf.d/目录下新建一个文件 , 如“xxx.conf”,然后将自己的库所在路径添加到这个conf文件中。

修改完文件后,以root身份运行 /sbin/ldconfig -v 。这一步必不可少,别丢了。

这时重新运行自己的程序,就没有问题了。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。