[英]Undefined symbol “afinfo” when importing python-iptables package “iptc”
我正在嘗試利用python-iptables包在Web應用程序中列出iptables規則。 將iptc軟件包添加到我的環境中時,出現以下錯誤。 我使用yum'provides'查找libxtables.so.4文件的來源,並發現iptables
和iptables-devel
軟件包是CentOS 6.4 x64中的適當選擇。 我升級了那些軟件包,但沒有改變錯誤。
有人對我如何解決此問題有任何建議嗎?
pgrace@ny-misc01:~/repos/python-iptables/libxtwrapper$ python
Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import iptc
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python2.6/site-packages/iptc/__init__.py", line 10, in
from ip4tc import Table, Chain, Rule, Match, Target, Policy, IPTCError
File "/usr/lib64/python2.6/site-packages/iptc/ip4tc.py", line 11, in
from xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
File "/usr/lib64/python2.6/site-packages/iptc/xtables.py", line 744, in
class xtables(object):
File "/usr/lib64/python2.6/site-packages/iptc/xtables.py", line 757, in xtables
_xtables_afinfo = ct.c_void_p.in_dll(_lib_xtables, "afinfo")
ValueError: /lib64/libxtables.so.4: undefined symbol: afinfo
>>>
看到這個: https : //github.com/ldx/python-iptables/issues/25
這是一個已知問題 ,舊版本的libxtables聲明afinfo
為靜態,因此python-iptables無法訪問。 不過,有一個可能的解決方法-請密切注意故障單,一旦取得進展,它將進行更新。
另一種解決方案是更新計算機上的iptables。
免責聲明:我是python-iptables的維護者。
更新:現在應該解決此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.