I am trying to install pwndbg on my virtual machine (Vmware)
Kali Linux 2017.2
Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.4-2kali1 (2017-10-16) x86_64 GNU/Linux
I just follow the readme file to install it, but something wrong
the script said that that the 'Python.h' is not found, but actually this file is stored at :
# locate 'Python.h'
/usr/include/python2.7/Python.h
/usr/include/python3.5m/Python.h
by the way, I already have psutils installed on my virtual machine
could you help me to figure out how to solve it ?
thank you so much
+ sudo /usr/bin/python3.6 -m pip install --target /usr/local/lib/python3.6/dist-packages -Ur requirements.txt
Collecting https://github.com/aquynh/capstone/archive/next.zip#subdirectory=bindings/python (from -r requirements.txt (line 11))
Downloading https://github.com/aquynh/capstone/archive/next.zip (3.5MB)
100% |ββββββββββββββββββββββββββββββββ| 3.6MB 18kB/s
Collecting pip (from -r requirements.txt (line 1))
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting pycparser (from -r requirements.txt (line 2))
Collecting psutil>=3.1.0 (from -r requirements.txt (line 3))
Using cached psutil-5.4.0.tar.gz
Collecting python-ptrace>=0.8 (from -r requirements.txt (line 4))
Using cached python_ptrace-0.9.3-py3-none-any.whl
Collecting pyelftools (from -r requirements.txt (line 5))
Collecting isort (from -r requirements.txt (line 6))
Using cached isort-4.2.15-py2.py3-none-any.whl
Collecting six (from -r requirements.txt (line 7))
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting future (from -r requirements.txt (line 8))
Collecting ROPgadget (from -r requirements.txt (line 9))
Collecting unicorn>=1.0.0 (from -r requirements.txt (line 10))
Using cached unicorn-1.0.1-py2.py3-none-manylinux1_x86_64.whl
Building wheels for collected packages: psutil
Running setup.py bdist_wheel for psutil ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a72q46wd/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpeq463rnupip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-60vxex/python3.6-3.6.2=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=540 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: pip, pycparser, psutil, python-ptrace, pyelftools, isort, six, future, capstone, ROPgadget, unicorn
Running setup.py install for psutil ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a72q46wd/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7va3g6uj-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbftvxwp3:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-60vxex/python3.6-3.6.2=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=540 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a72q46wd/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7va3g6uj-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbftvxwp3" failed with error code 1 in /tmp/pip-build-a72q46wd/psutil/
Can you try apt Install python-dev or python3-dev?
24.10.2017 6:21 PM "ηδΈθͺ" notifications@github.com napisaΕ(a):
Version : newest version Description
I am trying to install pwndbg on my virtual machine (Vmware)
Kali Linux 2017.2Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.4-2kali1 (2017-10-16) x86_64 GNU/Linux
I just follow the readme file to install it, but something wrong
the script said that that the 'Python.h' is not found, but actually this
file is stored at :locate 'Python.h'
/usr/include/python2.7/Python.h
/usr/include/python3.5m/Python.hby the way, I already have psutils installed on my virtual machine
could you help me to figure out how to solve it ?
thank you so much
Error Log
- sudo /usr/bin/python3.6 -m pip install --target /usr/local/lib/python3.6/dist-packages -Ur requirements.txt
Collecting https://github.com/aquynh/capstone/archive/next.zip#subdirectory=bindings/python (from -r requirements.txt (line 11))
Downloading https://github.com/aquynh/capstone/archive/next.zip (3.5MB)
100% |ββββββββββββββββββββββββββββββββ| 3.6MB 18kB/s
Collecting pip (from -r requirements.txt (line 1))
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting pycparser (from -r requirements.txt (line 2))
Collecting psutil>=3.1.0 (from -r requirements.txt (line 3))
Using cached psutil-5.4.0.tar.gz
Collecting python-ptrace>=0.8 (from -r requirements.txt (line 4))
Using cached python_ptrace-0.9.3-py3-none-any.whl
Collecting pyelftools (from -r requirements.txt (line 5))
Collecting isort (from -r requirements.txt (line 6))
Using cached isort-4.2.15-py2.py3-none-any.whl
Collecting six (from -r requirements.txt (line 7))
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting future (from -r requirements.txt (line 8))
Collecting ROPgadget (from -r requirements.txt (line 9))
Collecting unicorn>=1.0.0 (from -r requirements.txt (line 10))
Using cached unicorn-1.0.1-py2.py3-none-manylinux1_x86_64.whl
Building wheels for collected packages: psutil
Running setup.py bdist_wheel for psutil ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a72q46wd/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpeq463rnupip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-60vxex/python3.6-3.6.2=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=540 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include
^~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: pip, pycparser, psutil, python-ptrace, pyelftools, isort, six, future, capstone, ROPgadget, unicorn
Running setup.py install for psutil ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a72q46wd/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7va3g6uj-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbftvxwp3:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-60vxex/python3.6-3.6.2=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=540 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
#include
^~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1----------------------------------------Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-a72q46wd/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7va3g6uj-record/install-record.txt --single-version-externally-managed --compile --home=/tmp/tmpbftvxwp3" failed with error code 1 in /tmp/pip-build-a72q46wd/psutil/
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pwndbg/pwndbg/issues/356, or mute the thread
https://github.com/notifications/unsubscribe-auth/AJi7Com_NTuVs-OjApAWt0__VlT5wE82ks5svg6IgaJpZM4QEtTk
.
Your GDB was built with Python 3.6.
The failing command has this on the command-line has:
-I/usr/include/python3.6m
And the last line of your issue contains:
```
Command "/usr/bin/python3.6 -u ...
So these two files don't help you:
/usr/include/python2.7/Python.h
/usr/include/python3.5m/Python.h
```
You need to install the development package / headers for the correct version of Python.
oh, I already have python-dev and python3-dev installed...
I don't know why the problem occurred.
Could you tell me how can I install gdb which is built with python 3.6?
thank you so much
@zachriggle Do you mean, that I should remove gdb, and download its source code and recompile it with python3.6?
@WangYihang No, what I mean is: apt-get install python3.6-dev
In any case, see #357. GDB is broken on Kali. I'd recommend using a distro that doesn't ship broken packages, or building GDB from source.
Building gdb from sources ain't that hard. I will leave it here if someone needs that:
wget https://ftp.gnu.org/gnu/gdb/gdb-7.12.tar.xz
tar -xvf gdb-7.12.tar.xz
cd gdb-7.12
mkdir build
cd build
../configure --prefix=/usr --disable-nls --disable-werror --with-system-readline --with-python=/usr/bin/python3.6 --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all
make -j7
sudo make install
This might require installing some dependencies like readline.
Important note: adjust the gdb version (the latest stable should be the best :P) and python version/path.
This also enables all targets so you can use gdb to connect to gdbservers with mips/arm and other targets.
@disconnect3d Cool, thank you so much π― π
Installing this:
sudo apt-get install libpython3.6-dev
Solved all my problems on Debian Buster
For 4.18.0-kali3-amd64:
sudo apt-get install libpython3.7-dev
Most helpful comment
Installing this:
Solved all my problems on Debian Buster