繁体   English   中英

导入python-iptables包“ iptc”时,未定义符号“ afinfo”

[英]Undefined symbol “afinfo” when importing python-iptables package “iptc”

我正在尝试利用python-iptables包在Web应用程序中列出iptables规则。 将iptc软件包添加到我的环境中时,出现以下错误。 我使用yum'provides'查找libxtables.so.4文件的来源,并发现iptablesiptables-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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM