简体   繁体   English

python`ImportError:libboost_python27.so.1.67.0:无法打开共享对象文件:没有这样的文件或目录`

[英]python `ImportError: libboost_python27.so.1.67.0: cannot open shared object file: No such file or directory `

I'm running into a problem using a boost-compiled c++ code for python2.我在为 python2 使用 boost 编译的 c++ 代码时遇到了问题。 I've gotten this to install correctly using the boost package for anaconda2-2019 on WSL, but importing the python package yields the error:我已经在 WSL 上使用 anaconda2-2019 的 boost 包正确安装它,但是导入 python 包会产生错误:

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

I found where the libboost_python27.so.1.67.0 lives in ~/anaconda2/lib/ so I'm not sure why I'm getting this error returned.我发现libboost_python27.so.1.67.0位于~/anaconda2/lib/中,所以我不确定为什么会返回此错误。

This is an old post but you could try the following solutions taken from similar problem at Error loading shared libraries of boost这是一篇旧帖子,但您可以尝试以下解决方案,该解决方案取自错误加载 boost 的共享库时的类似问题

  1. link the c++ code module with the following flag将 c++ 代码模块与以下标志链接
-Wl,-rpath,/path/to/boost/libraries -lboost_python
  1. export the lib folder where the missing library is located导出缺失库所在的lib文件夹
export LD_LIBRARY_PATH=/path/to/boost/libs:$LD_LIBRARY_PATH 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ImportError:libboost_python.so.1.41.0:无法打开共享对象文件:没有这样的文件或目录 - ImportError: libboost_python.so.1.41.0: cannot open shared object file: No such file or directory 导入错误:libboost_python.so.1.65.1:无法打开共享对象文件:没有这样的文件或目录 - ImportError: libboost_python.so.1.65.1: cannot open shared object file: No such file or directory ImportError:libboost_iostreams.so.1.61.0:无法打开共享对象文件:没有这样的文件或目录 - ImportError: libboost_iostreams.so.1.61.0: cannot open shared object file: No such file or directory 如何克服 Python ImportError: libmqic_r.so: cannot open shared object file: No such file or directory - How to over come Python ImportError: libmqic_r.so: cannot open shared object file: No such file or directory ImportError:libcudnn.so.5:无法打开共享对象文件:没有这样的文件或目录,带有Tensorflow-gpu的Python 2.7 - ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory, Python 2.7 with Tensorflow-gpu 而导入python。 ImportError:libcublas.so.9.0:无法打开共享对象文件:没有这样的文件或目录 - While Import python. ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory ImportError:无法在Python中打开共享对象文件 - ImportError: Cannot open shared object file in Python Python3.5 导入错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python3.5 ImportError: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory ImportError:libcublas.so.8.0:无法打开共享对象文件:没有这样的文件或目录(共享Linux) - ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory (Shared Linux) Azure Linux Python Web应用程序ImportError:libodbc.so.2无法打开共享对象文件 - Azure Linux Python Webapp ImportError: libodbc.so.2 cannot open shared object file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM