pynetwork / pypcap

pypcap - python libpcap module, forked from code.google.com/p/pypcap
Other
299 stars 74 forks source link

undefined symbol: pcap_sendpacket #36

Open byteways opened 7 years ago

byteways commented 7 years ago

Hi when i install pcap on centos 4u3, i find this error:

Python 2.7.3 (default, Jan 8 2013, 14:35:04) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import pcap Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-x86_64/egg/pcap.py", line 7, in File "build/bdist.linux-x86_64/egg/pcap.py", line 6, in bootstrap ImportError: /root/.python-eggs/pypcap-1.1.5-py2.7-linux-x86_64.egg-tmp/pcap.so: undefined symbol: pcap_sendpacket exit Use exit() or Ctrl-D (i.e. EOF) to exit


thx

byteways commented 7 years ago

it is cased by old version?

[root@xxx# ll /usr/lib/libpcap.so.1 lrwxrwxrwx 1 root root 16 Aug 3 2012 /usr/lib/libpcap.so.1 -> libpcap.so.1.3.0 [root@xxx]# ll /usr/lib64/libpcap.so.0.8.3 -rwxr-xr-x 1 root root 154952 Jun 7 2005 /usr/lib64/libpcap.so.0.8.3 [root@xxx]# ll /lib/rh80/usr/lib/libpcap.so.0.6.2 -rw-r--r-- 1 root root 311870 Aug 2 2002 /lib/rh80/usr/lib/libpcap.so.0.6.2 [root@xxx]# ll /usr/lib/libpcap.so lrwxrwxrwx 1 root root 12 Aug 3 2012 /usr/lib/libpcap.so -> libpcap.so.1 [root@xxx]# ll /lib/rh80/usr/lib/libpcap.so lrwxrwxrwx 1 root root 16 Mar 31 2012 /lib/rh80/usr/lib/libpcap.so -> libpcap.so.0.6.2 [root@xxx]# ll /root/.python-eggs/pypcap-1.1.5-py2.7-linux-x86_64.egg-tmp/pcap.so

last error find one is just installed.

-rwxr-xr-x 1 root root 301460 Jan 9 14:32 /root/.python-eggs/pypcap-1.1.5-py2.7-linux-x86_64.egg-tmp/pcap.so

hellais commented 6 years ago

Yes I suspect this is due to a old version of libpcap having an ABI that is incompatible with the more recentish versions.

What happens if you update to a more recent libpcap or compile libpcap from source?