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

I'm trying to build gtk, but it fails. Here's what I'm doing:

sudo apt-get build-dep libgtk2.0-common
apt-get source libgtk2.0-common
cd gtk+2.0-2.22.0/
gedit gtk/gtktreeview.c &
#...editing a few files (or not, it's the same error)
./configure --prefix=/usr

The compilation runs for a while and then quits:

Gdk-2.0.gir: error: Type reference 'GdkPixbuf' not found
make: *** [all] Error 2

What am I doing wrong?

share|improve this question
you shouldn't use "sudo" for configure and make, it is only required for "make install", out of curiosity why are you trying to build gtk ? ? – João Pinto Jan 4 '11 at 14:43
The reason I'm trying to build gtk is to answer this question :-) – Stefano Palazzo Jan 5 '11 at 18:51
up vote 3 down vote accepted

If you want to use the package source you should compile using the package debian building rules instead of using the plain configure / make as you do from an original source. To build using the package build rules, from the source directory, just run:


The manual building is probably failing because of a needed patch which is applied from the package building rules.

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.