linux之解决lib***.so.*: cannot open shared object file

例如:libvtkfreetype-8.2.so.1: cannot open shared object file: No such file or directory
1.查找库位置

 whereis libvtkfreetype-8.2.so.1 

libvtkfreetype-8.2.so: /usr/local/lib/x86_64-linux-gnu/libvtkfreetype-8.2.so /usr/local/lib/x86_64-linux-gnu/libvtkfreetype-8.2.so.1

2. 在/etc/ld.so.conf最后一行添加

include ld.so.conf.d/*.conf
/usr/local/lib/x86_64-linux-gnu/

3. 让动态链接库为系统所共享

sudo ldconfig

你可能感兴趣的:(linux,pcl,linux)