美文网首页
Linux系列 | 遇到 cannot open shared

Linux系列 | 遇到 cannot open shared

作者: iBioinformatics | 来源:发表于2023-04-05 09:08 被阅读0次

一、系统里面有就使用

跑程序时,显示错误如下:

ImportError: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory

问题解析:
原因:这里的libmkl_intel_lp64.so是一个动态链接库文件,系统找不到。

解决方案:
搜索该文件所在路径:

# 在/opt/conda路径下查找对应文件,一般就在安装的conda路径下
find /opt/conda -name libmkl_intel_lp64.so

假如find的结果显示如下,那么这就是所在路径了

/opt/conda/lib/libmkl_intel_lp64.so

将干菜搜索出的路径添加到环境变量中,到lib文件即可:

export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH

更新环境变量文件

source ~/.bashrc

确认一下是否正确添加了路径

echo $LD_LIBRARY_PATH

这样,就可以找到动态库连接文件了。

转自:https://blog.csdn.net/weixin_43882112/article/details/121123252

相关文章

网友评论

      本文标题:Linux系列 | 遇到 cannot open shared

      本文链接:https://www.haomeiwen.com/subject/ntwdddtx.html