![](/img/trans.png)
[英]Resetting all global internal state of the net-snmp library from the Python bindings
[英]Python 2 Bindings Net-SNMP Error - undefined symbol: netsnmp-memdup
我在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綁定。 這是包含在net-nsmp下載中的,為另一個名為“ Python”的文件夾,其中包含setup.py
文件。 但是,當運行命令python setup.py test
我注意到了一些問題。 我以為這可能沒什么好擔心的,所以我繼續執行python setup.py install
我不確定自述文件中的說明是什么,即“ python setup.py test(需要本地運行的代理w / config)提供)”。 因此,這就是為什么我在測試失敗時安裝它的原因。 無論如何,我不確定這是否是問題。
成功安裝net-snmp的python綁定后,我將目錄切換回了我的桌面,並打開了一個交互式python shell。 從這里,我導入了netsnmp
模塊,並收到以下錯誤。 幾乎像變量netsnmp_memdup
中存在拼寫錯誤,該錯誤將在Traceback中netsnmp_memdup
該錯誤。 這看起來像是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問題。
節日快樂,
user_loser
Alrgihty,感謝我的好朋友Naveen,我們已將其追溯到5.7.3中Python Net-SNMP綁定中的實際錯誤。
有兩種解決方法:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.