0

Trying to install gdb-peda, but am having issues compiling gdb with python 2 support instead of python 3 support. I have

python-dev for 2.7, 
build-dep nmon,
and libncurses5-dev

installed. I installed gdb-peda before I uninstalled and subsequently compiled gdb.

~/gdb-7.8$ ./configure --with-python
~/gdb-7.8$ make all
~/gdb-7.8$ sudo make install

GDB installs without errors (after I installed the necessary libraries), but when I run it I get:

Traceback (most recent call last):
  File "~/peda/peda.py", line 23, in <module>
Exception: Python3 is not supported at the moment, downgrade you GDB or recompile with Python2!

This is the same error I got before I reinstalled gdb.

3 Answers 3

4

An easier way to install gdb with Python 2.7 support is:

sudo apt-get remove gdb
wget http://security.ubuntu.com/ubuntu/pool/main/g/gdb/gdb_7.4-2012.02-0ubuntu2_amd64.deb
sudo dpkg -i ./gdb_7.4-2012.02-0ubuntu2_amd64.deb

Substitute i386 for amd64 if necessary.

The first line removes the current gdb version. The second will download gdb from a previous version. And the last line installs it.

1

For this issue you are having 2 ways:

Recompile GDB --with-python=python2 (or) Downgrade GDB.

For downgrading you need one mirror support older GDB: http://virror.hanoilug.org/ubuntu/virror_precise_sources.list You need synaptic. Search GDB, chose Package/Force Version/Chose 7.4. Confirm and install now.

2
1

You can install another version what has been extended by Zach Riggle to add some features and give dual-compatibility with Python2 and Python3.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .