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

# 原因 编译的时候指定的动态库,在运行时没有找到。因为编译和运行需要查找的目录是不通用的,需要在运行时指定查找动态库的目录。 # 解决方法 运行时,指定动态库搜索的路径 ``` export LD_LIBRARY_PATH=/xxx/lib:$LD_LIBRARY_PATH ```
posted @ 2023-08-18 17:42  秋来叶黄  阅读(51)  评论(0编辑  收藏  举报