Error while loading shared libraries:x.so: cannot open shared object file: No such file or directory

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/LuyaoYing001/article/details/81325994

首先使用find / -name x.so查找报错的so动态库是否已经正确安装,没有就安装相应的动态库。

错误原因:如果动态库已经存在,那么报错是因为该动态库的路径不在系统的库搜索路径中,需要设置LD_LIBRARY_PATH环境变量:

export LD_LIBRARY_PATH=/path/to/my/library
./run

猜你喜欢

转载自blog.csdn.net/LuyaoYing001/article/details/81325994