在尝试运行一个我刚编译成功的程序时,我遇到了以下错误:
./src/sensors/laser_scan_producer: error while loading shared libraries: liblcm.so.1: cannot open shared object file: No such file or directory
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
我已经执行了几次sudo ldconfig
并将/usr/local/lib添加到LD_LIBRARY_PATH以实现冗余。这是我在stackOverflow上搜索过程中看到的答案列表的尽头。
有人发现问题了吗?
ldconfig
使用文件/etc/ld.so.conf
。您可以将/usr/local/lib
添加到该文件中,重新运行ldconfig
并再次尝试。 - Some programmer dude