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 am trying to compile chromium source on ubuntu 10.10. But I get this "gdk-pixbuf/gdk-pixbuf.h: No such file or directory" error. Can you please tell how can I fix it? I have the '/usr/include/gtk-2.0/gdk/gdkpixbuf.h', so I should have gdkpixbuf dev package right? (since it said '/usr/include/gtk-2.0/gdk/gdkpixbuf.h:37: fatal error: gdk-pixbuf/gdk-pixbuf.h: No such file or directory'

$ make out/Debug/chrome
  CXX(target) out/Debug/
In file included from /usr/include/gtk-2.0/gdk/gdkcairo.h:28,
                 from /usr/include/gtk-2.0/gdk/gdk.h:33,
                 from app/
/usr/include/gtk-2.0/gdk/gdkpixbuf.h:37: fatal error: gdk-pixbuf/gdk-pixbuf.h: No such file or directory
compilation terminated.
make: *** [out/Debug/] Error 1
share|improve this question

There's a generic “teach a man to fish…” answer here, too:

Install the apt-file package, and use it to search for the package containing the file you need. In this case, you get:

└─(14:36:%)── apt-file search gdk-pixbuf/gdk-pixbuf.h
libgdk-pixbuf2.0-dev: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h
libgfcui-dev: /usr/include/gfc-2.0/gfc/gdk-pixbuf/gdk-pixbuf.hh
lsb-build-desktop3: /usr/include/lsb3/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h

which has (surprisingly) returned more than one result. libgdk-pixbuf2.0-dev is the package you're after.

share|improve this answer

I have both of the referenced packages installed and have had similar issues. In 10.10 it seems that the gdk-pixbuf includes are stored in their own directory off of /usr/include, whereas in previous versions they had been lumped in with gtk-2.0. If you have installed libgtk2.0-dev and libgdk-pixbuf2.0-dev then you'll need to execute:

sudo ln -s /usr/include/gdk-pixbuf-2.0/gdk-pixbuf /usr/include/gtk-2.0/gdk-pixbuf

This will create a symbolic link to the new gdk-pixbuf directory where it had been located previously.

share|improve this answer
This is the only solution that worked for me. It seems like a distribution bug in 10.10. Merely installing libgdk-pixbuf2.0-dev did not fix the problem. – SuperElectric Aug 2 '11 at 23:56
+1 this worked on a Mac also. – Kelvin Sep 19 '11 at 22:28

You have gdkpixbuf.h, which is not the same as gdk-pixbuf.h. Note the dash, they are two different files.

greyfade is probably correct in you needing that package greyfade mentions, you should probably install libgdk-pixbuf2.0-dev as well since gdk-pixbuf.h is in the libgdk-pixbuf2.0-dev package.

Doing an "aptitude build-dep chromium-browser" should download all of the development packages you need to manually install the chromium-browser source package for 10.10. It should help even if you're pulling straight from chromium itself - you're going to need those development files anyhow.

share|improve this answer

Of course, please install libgdk-pixbuf2.0-dev first:

sudo apt-get install libgdk-pixbuf2.0-dev


sudo ln -s /usr/include/gdk-pixbuf-2.0/gdk-pixbuf /usr/include/gtk-2.0/gdk-pixbuf
share|improve this answer
I think it is just a bug of 10.10, 11.04+ will not happen this error. – tsyj2007 Dec 10 '11 at 7:19

From the GTK+ Reference Manual you should tell the compiler where to find the GTK+ header files and libraries. This is done with the pkg-config utility.

$ pkg-config --cflags gtk+-2.0

Or to use the "backticks" feature of the shell.

$ cc `pkg-config --cflags --libs gtk+-2.0` hello.c -o hello
share|improve this answer

Install libgtk2.0-dev.

share|improve this answer

Copy the folder gdk-pixbuf from /usr/include/gdk-pixbuf-2.0 to /usr/include/gtk-2.0. That did the trick for me.

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.