python-libpcap dependency installation on Linux 6.1.22 Platform
Closed this issue · 4 comments
We are trying to install dependency (python-libpcap) in OS : Linux 6.1.22 && Processor : NXP’s i.MX93
but, we are facing an issue attached in logs.
Logs:
(.venv) root@imx93-iwg50m-osm:~/govind/Python-3.8.12/myproject# pip install python-libpcap
Collecting python-libpcap
Downloading python-libpcap-0.4.2.tar.gz (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.2/81.2 kB 1.3 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: Cython>=0.29.23 in ./.venv/lib/python3.8/site-packages (from python-libpcap) (3.0.10)
Building wheels for collected packages: python-libpcap
Building wheel for python-libpcap (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for python-libpcap (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-38
creating build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/utils.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/pcap.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/parse.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/open.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/exception.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/cli.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/main.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
copying pylibpcap/init.py -> build/lib.linux-aarch64-cpython-38/pylibpcap
running egg_info
writing python_libpcap.egg-info/PKG-INFO
writing dependency_links to python_libpcap.egg-info/dependency_links.txt
writing entry points to python_libpcap.egg-info/entry_points.txt
writing requirements to python_libpcap.egg-info/requires.txt
writing top-level names to python_libpcap.egg-info/top_level.txt
reading manifest file 'python_libpcap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
/tmp/pip-build-env-n0fcyqlp/overlay/lib/python3.8/site-packages/setuptools/dist.py:476: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2024-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
warning: no files found matching '*.h' under directory 'src'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
adding license file 'LICENSE'
writing manifest file 'python_libpcap.egg-info/SOURCES.txt'
copying pylibpcap/base.c -> build/lib.linux-aarch64-cpython-38/pylibpcap
running build_ext
building 'pylibpcap.base' extension
creating build/temp.linux-aarch64-cpython-38
creating build/temp.linux-aarch64-cpython-38/pylibpcap
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/root/govind/Python-3.8.12/myproject/.venv/include -I/usr/local/include/python3.8 -c pylibpcap/base.c -o build/temp.linux-aarch64-cpython-38/pylibpcap/base.o -lpcap
pylibpcap/base.c:768:10: fatal error: pcap.h: No such file or directory
768 | #include "pcap.h"
| ^~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-libpcap
Failed to build python-libpcap
ERROR: Could not build wheels for python-libpcap, which is required to install pyproject.toml-based projects**
Looking forward to the possible solutions.
Hey @KrushanPatel,
you need to install a package similar do Debians libpcap-dev in order to use python-libpcap.
Best regards,
lho
This issue has been marked as stale because it has been open for 14 days with no activity. Please update this issue or it will be closed in the next 7 days.
Thank you for your support.