error while loading shared libraries的解决方法

错误提示:

./prog: error while loading shared libraries: xxx.so.0:
cannot open shared object file: No such file or directory

这个提示的意思是没有找到xxx.so.0这个文件,那么首先应该确定下,本机是否存在这个.so文件?如果存在,那么我们可以作出判断,xxx.so.0这个动态链接库所在的文件夹不在搜寻范围内. (more…)