error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
解决方法:
可以直接在将自己的库所在路径添加到/etc/ld.so.conf文件中。但一般这个文件中的内容都是一句“include /etc/ld.so.conf.d/*.conf”,因此最好在/etc/ld.so.conf.d/目录下新建一个文件 , 如“xxx.conf”,然后将自己的库所在路径添加到这个conf文件中。
修改完文件后,以root身份运行 /sbin/ldconfig -v 。这一步必不可少,别丢了。
这时重新运行自己的程序,就没有问题了。