Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/", 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
up vote 2 down vote accepted

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

sudo apt-get remove gdb
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.

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: 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: 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.