cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
MrHim opened this issue · comments
:/Pyrit$ python setup.py buildrc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.5.1" -maes -mpclmul
running build
running build_py
running build_ext
building 'cpyrit._cpyrit_cpu' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/cpyrit
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IzSqQI/python2.7-2.7.18
cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
32 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
Failed to build; Compiling without AES-NI
building 'cpyrit._cpyrit_cpu' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IzSqQI/python2.7-2.7.18~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.5.1"
cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
32 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run the following:
sudo apt-get update && sudo apt-get install python-dev python3-dev
Compiling from source-code is the preferred way of getting Pyrit onto your system. Linux users running a binary distribution may need to install the development packages for:
Python e.g. python-devel (CentOS/Fedora) or python-dev (Ubuntu/Debian) OpenSSL e.g. openssl-devel or libssl-dev (you get which one) and Zlib (e.g. zlib-devel).
https://github.com/JPaulMora/Pyrit/wiki#general-dependencies
:
/Pyrit$ python setup.py build running build running build_py running build_ext building 'cpyrit._cpyrit_cpu' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/cpyrit x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IzSqQI/python2.7-2.7.18rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.5.1" -maes -mpclmul
cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
32 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
Failed to build; Compiling without AES-NI
building 'cpyrit._cpyrit_cpu' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-IzSqQI/python2.7-2.7.18~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.5.1"
cpyrit/_cpyrit_cpu.c:32:10: fatal error: Python.h: No such file or directory
32 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
same crap damn!
Run the following:
sudo apt-get update && sudo apt-get install python-dev python3-dev
EDIT: My blind-self realized he put "python-dev", which is for python2.x versions
Pyrit is built for Python 2* so, try sudo apt-get install python2.7
If not, try changing your CLI to python2 setup.py clean build install
Installing python-dev
solves the problem. This issue can be closed.
I also suggest updating the Wiki with this information, or creating a troubleshooting guide.
Thanks for the above now i get error:
cpyrit/_cpyrit_cpu.c:35:10: fatal error: openssl/hmac.h: No such file or directory
Hello guys, I managed to get Pyrit working with CUDA on latest kali. Seems to me the most common issue is trying old libraries and/or Python3 which is not supported yet.
As I've stated before, there's plans to upgrade (and improve Pyrit) but for now I'll just update the wiki with working instructions.
hi john i was able to get it to compile but the analyze option doesn't work due to scapy.