无法加载共享库,存在在/ usr / local / lib目录(Fedora的64) [英] cannot load shared library that exists in /usr/local/lib (Fedora x64)

查看:1099
本文介绍了无法加载共享库,存在在/ usr / local / lib目录(Fedora的64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当试图运行我刚才编译成功的程序,我得到以下错误:

When attempting to run a program I just compiled successfully, I get the following error:

./的src /传感器/ laser_scan_producer:错误而载入共享库: liblcm.so.1 :无法打开共享对象文件:没有这样的文件或目录

./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

我已经执行须藤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,然后重试

ldconfig uses the file /etc/ld.so.conf. You can add /usr/local/lib to that file, re-run ldconfig and try again

这样做解决了这一问题,但我觉得很奇怪,在/ 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆