1
我想利用python-iptables軟件包列出web應用程序中的iptables規則。當我將iptc軟件包添加到我的環境中時,出現以下錯誤。我用yum'provides'來查找libxtables.so.4文件的來源,發現iptables
和iptables-devel
包是CentOS 6.4 x64中的合適選擇。我升級了這些軟件包,但沒有改變錯誤。導入python-iptables軟件包「iptc」時未定義的符號「afinfo」
有沒有人有任何關於如何解決這個問題的建議?
[email protected]:~/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
>>>
我在Ubuntu 11中遇到了這個問題,但在Ubuntu 12中沒有遇到這個問題 – Saad