Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

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

First remove the gdb version with:

 sudo apt-get remove gdb

Next download the old package from:

i386: http://security.ubuntu.com/ubuntu/pool/main/g/gdb/gdb_7.4-2012.02-0ubuntu2_i386.deb

amd64: http://security.ubuntu.com/ubuntu/pool/main/g/gdb/gdb_7.4-2012.02-0ubuntu2_amd64.deb

Install the package with any package manager you like e.g the ubuntu software center

Now gdb-peda works.

share|improve this answer

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.

share|improve this answer
Where do I save that file to? –  robertkin Nov 11 '14 at 21:19
Not sure where to save this file to: virror.hanoilug.org/ubuntu/virror_precise_sources.list. If I just left it in my downloads folder, synaptic didn't list 7.4 as an option. –  robertkin Nov 11 '14 at 21:35

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.