Linux运行程序时报:

./Test2: error while loading shared libraries: lib***.so: 
cannot open shared object file: No such file or directory

一般遇见这个问题,直接ldd看一下依赖的so和LD_LIBRARY_PATH,然后再export LD_LIBRARY_PATH,加上对应路径基本就能解决。

如果报出问题时依赖的so是能够found的,但是运行时依然出现该问题。

可以尝试执行:

sudo vim /etc/ld.so.conf

将文件修改为:

include /etc/ld.so.conf.d/*.conf
/usr/***/***/lib

保存后执行sudo ldconfig即可。

相关文章:

  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2021-10-04
  • 2021-04-04
  • 2021-08-29
  • 2022-02-23
相关资源
相似解决方案