pylibnet成功安装,但返回“libnet.so.9:无法打开共享对象文件:没有这样的文件或目录”

时间:2016-08-05 02:12:53

标签: libnet

1,我通过“configure; make; make install”安装了libnet,它返回成功:

make[1]: Leaving directory `/data/home/fiontools/pcap/tool/libnet-1.2-rc3/win32'
make[1]: Entering directory `/data/home/fiontools/pcap/tool/libnet-1.2-rc3'
make[2]: Entering directory `/data/home/fiontools/pcap/tool/libnet-1.2-rc3'
 /bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c libnet-config '/usr/local/bin'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/data/home/fiontools/pcap/tool/libnet-1.2-rc3'
make[1]: Leaving directory `/data/home/fiontools/pcap/tool/libnet-1.2-rc3'

2,安装pylibnet,也返回成功。

python setup.py install  
Searching for libnet...
/usr/local/include/
running install
running build
running build_ext
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/bin/lnsh to 755
running install_egg_info
Removing /usr/lib64/python2.6/site-packages/pylibnet-3.0rc1-py2.6.egg-info
Writing /usr/lib64/python2.6/site-packages/pylibnet-3.0rc1-py2.6.egg-info

3,当我使用libnet时,它没有返回libnet.so:

 python
Python 2.6.6 (r266:84292, Dec  7 2011, 20:48:22) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libnet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libnet.so.9: cannot open shared object file: No such file or directory
>>> 

1 个答案:

答案 0 :(得分:0)

通过添加lib路径解决了问题:

super.init()