首页 > 技术文章 > cannot open shared object file: No such file or directory

hencins 2020-12-15 15:16 原文

问题:调用动态库报 cannot open shared object file: No such file or directory

解决:

  1. ldd xxx查看依赖缺失
  2. 修改共享库配置文件 /etc/ld.so.conf
    2.1 添加 include /etc/ld.so.conf.d/*.conf
    2.2 在 *.conf 中编写 /home/xxx/sopath
  3. 立即生效 sudo ldconfig

推荐阅读