adell4444
(Andrew)
September 6, 2023, 4:37pm
1
adell4444
(Andrew)
September 6, 2023, 4:43pm
2
I can install other modules. Below is the error when installing pcapy:
[root@freepbx ~]# pip3 install pcapy
Collecting pcapy
Using cached pcapy-0.11.4.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pcapy, since package 'wheel' is not installed.
Installing collected packages: pcapy
Running setup.py install for pcapy ... error
ERROR: Command errored out with exit status 1:
command: /bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ai481zmw/pcapy_b1e7c54faae64896b06810723fe94320/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ai481zmw/pcapy_b1e7c54faae64896b06810723fe94320/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-r41gd9b8/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.6m/pcapy
cwd: /tmp/pip-install-ai481zmw/pcapy_b1e7c54faae64896b06810723fe94320/
Complete output (12 lines):
running install
running build
running build_ext
building 'pcapy' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c pcapdumper.cc -o build/temp.linux-x86_64-3.6/pcapdumper.o
pcapdumper.cc:10:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ai481zmw/pcapy_b1e7c54faae64896b06810723fe94320/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ai481zmw/pcapy_b1e7c54faae64896b06810723fe94320/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-r41gd9b8/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.6m/pcapy Check the logs for full command output.
cdolese
(Chris Dolese)
September 6, 2023, 5:01pm
3
I was struggling with pip3 for gTTS and the below worked for me but I see you have that cited already
I think I got it!!
yum install python36u-pip
ln -s /usr/bin/python3.6 /usr/bin/python3
python3 -m pip install --upgrade pip
From there, the pip3 command and the certutils script will run.
Now all I need to figure out is where exactly to save these certificates in the Sangoma OS filesystem. The instructions on the site want to save the System Administrator Security Token (SAST) at /etc/ssl/private/sast.pem, but /etc/ssl/private does not exist in the distro. I am going to assume I can sa…
adell4444
(Andrew)
September 6, 2023, 5:15pm
4
Yeah other modules like dpkt install fine with pip3 just not pcapy. I am close to figuring it out and if I do I’ll post back here, just wondering if anyone had specific experience with that module.
adell4444
(Andrew)
September 6, 2023, 5:39pm
5
So I have to use python 2.7 in order to get it to work. The reason I can’t get it to work with python 3 is I am missing dependency python3-devel but it won’t let me install it due to file conflicts with python3.6u. So:
yum install python-devel
yum install libpcap-devel
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
python get-pip.py
pip install pcapy
It warns about 2.7 being EOL but it seems the only way to get it to work on SNG7. I cannot remove or modify 3.6u because sangoma-pbx.noarch is a dependency.
system
(system)
Closed
October 7, 2023, 5:39pm
6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.