Comments (6)
Pip is using the wrong pcap header. Install libpcap-dev will fix this issue in ubuntu.
from pypcap.
I was able to get it to install by replacing d with '/usr' on line 46 of setup.py, like this:
lib_sub_dirs = [os.path.join('/usr', sub_dir) \
I can't guarantee it will work on all systems as it is a quick and dirty hack, but there you go
from pypcap.
I have the same problem on OSX 10.11.1
from pypcap.
same problem on Ubuntu 15.04
➜ ~ sudo pip install pypcap
Downloading/unpacking pypcap
Downloading pypcap-1.1.4.tar.gz (41kB): 41kB downloaded
Running setup.py (path:/tmp/pip-build-mtsqO_/pypcap/setup.py) egg_info for package pypcap
Found pcap headers in /usr/src/linux-headers-4.2.0-30-generic/include/config/ezx/pcap.h
Found libraries in None
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-mtsqO_/pypcap/setup.py", line 60, in <module>
lib_file = os.path.basename(lib_file_path)
File "/usr/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Complete output from command python setup.py egg_info:
Found pcap headers in /usr/src/linux-headers-4.2.0-30-generic/include/config/ezx/pcap.h
Found libraries in None
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-mtsqO_/pypcap/setup.py", line 60, in <module>
lib_file = os.path.basename(lib_file_path)
File "/usr/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-mtsqO_/pypcap
from pypcap.
same problem in ubuntu 16.04:
pip install pypcap
Collecting pypcap
Using cached pypcap-1.1.5.tar.gz
Complete output from command python setup.py egg_info:
Found pcap headers in /usr/src/linux-headers-4.4.0-28-generic/include/config/touchscreen/pcap.h
Found libraries in None
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-YMm_2h/pypcap/setup.py", line 59, in <module>
lib_file = os.path.basename(lib_file_path)
File "/home/lconceicao/envs/pypcap-test/lib/python2.7/posixpath.py", line 114, in basename
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YMm_2h/pypcap/
from pypcap.
Note the current development of pypcap is now on: https://github.com/pynetwork/pypcap.
Please file issues there.
from pypcap.
Related Issues (20)
- Pypcap on Mac OS X and Python 2.7 HOT 1
- "couldn't find pcap build or installation directory" HOT 5
- Move pypcap to github HOT 1
- [deleted issue]
- AttributeError: 'pcap.pcap' object has no attribute 'inject' HOT 3
- comilation commands
- immediate = True is ignored
- pypcap depends from pcap-int.h which is internal pcap stuff and shouldn't be included (breaking build on some systems)
- error: no suitable device found HOT 1
- 在64位的Win7上用不了,你有这个二进制安装文件吗?
- error mingw-32 make on windows
- Stop pypcap from capturing and writing network traffic to a file HOT 1
- loop() will exist and lost packet, even if cnt=0
- command 'arm-linux-gnueabihf-gcc' failed with exit status 4
- 'NoneType' object has no attribute 'rfind' HOT 2
- undefinded refrences. for python.h function
- Consolidate pypcap forks HOT 2
- about docs
- How to set buffer size in pypcap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypcap.