本文介绍了在python中导入Zookeeper libzookeeper_mt.so.2时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试以Python导入此.so文件时遇到问题...我将其添加到了/etc/bashrc 中,并且 source 将其制成重新加载...到目前为止没有运气...

I am having issues trying to import this .so file in Python...I added this to my /etc/bashrc and source'd it to make it reload...no luck so far...

LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib

文件确实存在于/usr/local/lib/lobzookeeper_mt.so.2

  File "build/bdist.linux-x86_64/egg/zookeeper.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/zookeeper.py", line 6, in __bootstrap__
ImportError: libzookeeper_mt.so.2: cannot open shared object file: No such file or directory

我现在不知道该怎么办,有人知道我在做什么错吗?我也正在使用Centos 6 64位.

I have no idea what to do at this point, anyone have an idea on what I am doing wrong? I am using Centos 6 64 bit too btw.

推荐答案

如果无法找到要加载的库的依赖项,则尝试加载库会失败,并显示无此类文件或目录".运行 ldd :

Attempting to load a library will, confusingly, fail with "no such file or directory" if a dependency of the library you're trying to load cannot be found. Run ldd:

ldd /path/to/your/library.so

,然后查找找不到"一词,以检查是否是这种情况.

and look for the words "not found" to check if this is the case.

这篇关于在python中导入Zookeeper libzookeeper_mt.so.2时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 17:13