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

天道酬勤 / 2023-08-18 / 原文

原因

编译的时候指定的动态库,没有在运行时查找的目录中,找不到对应的动态库

解决方法

运行时,指定动态库搜索的路径

export LD_LIBRARY_PATH=/xxx/lib:$LD_LIBRARY_PATH