Linux执行程序时如果缺少连接库会提示如下错误:
error while loading shared libraries: xxx.so.0: cannot open shared object file: No such file or directory
下面叙述以Ubuntu系统为例。
先查找 xxx.so.0 所在路径:
$ sudo find / -name xxx.so.0
/usr/local/lib/xxx.so.0
然后执行下面命令解决:
$ sudo ldconfig /usr/local/lib