1

I am running Luna (Elementary OS 0.2.1) on Ubuntu "Precise" 12.0.4. I want to compile Geany 1.26 from the source, but when I ./configure, I get this error:

...
checking for GTK... no
configure: error: Package requirements (gtk+-2.0 >= 2.24 glib-2.0 >= 2.28 gio-2.0 >= 2.28 gmodule-no-export-2.0) were not met:

No package 'gtk+-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config.

However, I have gtk 3.0 installed, re:

dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'

libgtk-3-0
libgtk-3-bin
libgtk-3-common
libgtk-3-dev
libgtk2-perl
libgtk2.0-0
libgtk2.0-common

And:

pkg-config --modversion gtk+-2.0

Package gtk+-2.0 was not found in the pkg-config search path.

Can someone please explain the following?

1) How did this happen? Shouldn't ubuntu update the pkg-config path for me when I installed libgtk-3-0?

2) Do I really need to manually update the pkg-config search path or is there something else that should be done that will correct this problem?

I find that there are typically n+1 ways to accomplish something in linux, but sometimes the most obvious solution is not the best one.

3

GTK+ has two major branches, 2.0 and 3.0. They are incompatible and Geany is a GTK+ 2.0 application. You'll need the development headers for GTK+ 2.0. These are included in a package called libgtk2.0-dev.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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