gpt4 book ai didi

Python 2 绑定(bind) Net-SNMP 错误 - undefined symbol : netsnmp-memdup

转载 作者:太空狗 更新时间:2023-10-29 21:05:42 25 4
gpt4 key购买 nike

我在 Ubuntu 上成功编译了 net-snmp-5.7.3。 :D 这是 Ubuntu 的特定版本:

Linux loserBox 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

我似乎也已经成功安装了 net-snmp 的 Python 绑定(bind)。这包含在 net-nsmp 下载中,作为一个名为“Python”的不同文件夹,其中包含 setup.py 文件。但是,在运行命令 python setup.py test 时,我注意到了一些问题。我认为这可能没什么好担心的,所以我继续执行 python setup.py install 我不确定 README 文件中的说明是什么意思,“python setup.py test(需要提供配置的本地运行代理)”。所以,这就是为什么我用失败的测试或其他东西安装它。无论如何,我不确定这是否是一个问题。

在成功安装 net-snmp 的 python 绑定(bind)后,我将目录切换回我的桌面并打开了一个交互式 python shell。从这里我导入了 netsnmp 模块并收到以下错误。看起来变量 netsnmp_memdup 中似乎存在拼写错误,它在 Traceback 中抛出了错误。这看起来像是 C 代码而不是 python 的问题。

Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import netsnmp
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning:
/home/loser_user/.python-eggs is writable by group/others and vulnerable to attack
when used with get_resource_filename. Consider a more secure location
(set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/netsnmp/__init__.py", line 1, in <module>
File "build/bdist.linux-x86_64/egg/netsnmp/client.py", line 1, in <module>
File "build/bdist.linux-x86_64/egg/netsnmp/client_intf.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/netsnmp/client_intf.py", line 6, in __bootstrap__
ImportError: /home/loser_user/.python-eggs/netsnmp_python-1.0a1-py2.7-linux-x86_64.egg-
tmp/netsnmp/client_intf.so: undefined symbol: netsnmp_memdup

有谁知道如何解决这个问题?我查看了该项目在 sourceforge 上的邮件列表页面并搜索了 supoort 文件,但没有找到任何东西。

感谢聆听狂人的 Python 问题。

节日快乐,

用户失败者

最佳答案

Alrgihty,感谢我的好 friend Naveen,我们已经将其追溯到 5.7.3 中 Python Net-SNMP 绑定(bind)中的实际错误。

有两种解决方法:

  1. 在 Net-SNMP 5.7.2 中使用 Python 绑定(bind)
  2. 在我们的 Net-SNMP Python 库的分支上查看此提交(昨天才开始,所以请耐心等待):https://github.com/fgimian/easysnmp/commit/fa86af977b563f65e7d70243752d48b94a8d5686并将其复制到您下载的 Net-SNMP 中。

关于Python 2 绑定(bind) Net-SNMP 错误 - undefined symbol : netsnmp-memdup,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27631684/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com