g2o error2

./pose_estimation_3d2d: error while loading shared libraries: libg2o_core.so: cannot open shared object file: No such file or directory缓存

在默认状况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件,经过源码包进行安装时,若是不指定--prefix会将库安装在/usr/local目录下,而又没有在文件/etc/ld.so.conf中添加 /usr/local/lib这个目录。这样虽然安装了源码包,可是使用时仍然找不到相关的.so库,就会报错。也就是说系统不知道安装了源码包。网络上的解决方法是在/etc/ld.so.conf里添加绝对路径/usr/local/lib.网络

在该文件中直接另起一行,直接写路径。/usr/local/lib3d

最后将修改写入缓存!!编译器

sudo ldconfig源码

相关文章
相关标签/搜索