问题描述
当试图运行我刚才编译成功的程序,我得到以下错误:
When attempting to run a program I just compiled successfully, I get the following error:
./的src /传感器/ laser_scan_producer:错误而载入共享库: liblcm.so.1 的:无法打开共享对象文件:没有这样的文件或目录
LS的/ usr / local / lib目录/ liblcm *
收益率
/usr/local/lib/liblcm.la
/usr/local/lib/liblcm.so
/usr/local/lib/liblcm.so.1
/usr/local/lib/liblcm.so.1.2.0
我已经执行须藤ldconfig的
几次,并添加在/ usr / local / lib目录添加到LD_LIBRARY_PATH为了冗余。
I have executed sudo ldconfig
several times and added /usr/local/lib to LD_LIBRARY_PATH for the sake of redundancy.
这耗尽了答案,我已经看到了,而周围的StackOverflow grepping名单。
This exhausts the list of answers I've seen whilst grepping around stackOverflow.
任何人发现这个问题?
推荐答案
感谢您@Joachim_Pileborg:
Thank you to @Joachim_Pileborg:
使用LDCONFIG文件/etc/ld.so.conf中。您可以添加在/ usr / local / lib目录到 该文件,重新运行ldconfig,然后重试
这样做解决了这一问题,但我觉得很奇怪,在/ usr / local / lib目录不会一直在事物的自然过程进行检查。
Doing so fixed the problem, although I find it odd that /usr/local/lib wouldn't have been checked in the natural course of things.
这篇关于无法加载共享库,存在在/ usr / local / lib目录(Fedora的64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!