Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 in the process of installing the required libraries for FireFox 3.6 on a Redhat Linux Nash 4.x system.

I already have successfully installed the glib2.12.0 library, but When I ./configure the atk 1.9.0 library I get the following error.

checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.5.7... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.5.7 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.

How can I add the path to the Environment variable?

share|improve this question
How did you install Glib 2.12.0? Post (the relevant part of) config.log. – Gilles Feb 26 '11 at 11:14
up vote 4 down vote accepted
  1. If you can install from repository. Check twice if you don't have it.
  2. If you cannot try bundled tarball from firefox page.
  3. Instead of installing all dependencies by hand try installing them from repository. For sure GLib is in debian repo. You need -dev/-devel or similar named packages
  4. For this particular problem - you installed the packages in the something called prefix. You can set this by ./configure --prefix=PREFIX and the default is /usr/local. Hence you need to add PREFIX/lib/pkgconfig to PKG_CONFIG_DIR. The exact method varies from shell to shell but the simplest option (for time of single session) is command export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

As last piece of advice -DON'T install from source. It is much more complicated that it look like and you will run into problems. Look at the number of tools you have in Gentoo operating system (revdep-rebuild, lafilefixer etc.) to handle it. You will be on your own and firefox/xulrunner using some parts in non-standard way will give helpful errors as XPCOM cannot start in case of SONAME mismatch.

You will have problems with uninstalling them as well and it may left garbage in system. Usually uninstall scripts are not well-tested and even build one are written carelessly.

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.