LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   error: *** libX11 not found. when installing GTK+-2.18.7 (http://www.linuxquestions.org/questions/linux-newbie-8/error-%2A%2A%2A-libx11-not-found-when-installing-gtk-2-18-7-a-790757/)

Prisp 02-22-2010 08:43 AM

error: *** libX11 not found. when installing GTK+-2.18.7
 
Hello,

I am using CentOS.

I already have installed GLib, Pixman, Cairo, ATK and Pango.
For this, I had to change PKG_CONFIG_PATH" to "/usr/local/lib/pkgconfig"

When running ./configure for the installation of gtk+-2.18.7,
I get the error message " error: *** libX11 not found.".

The package manager shows that 'libX11' and "libX11-devel" are installed.

Is there a conflict now because of the changed 'PKG_CONFIG_PATH"?
How can I resolve this conflict?

Many thanks.

irmin 02-22-2010 09:23 AM

It can be. Try the following:
Do not reset the PKG_CONFIG_PATH, but prepend your new path:
Code:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
In this case, pkg-config will search multiple directories and will eventually find your other pkg-config-files. Maybe
Code:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
can help too.

If this does not help, try to post config.log or configure.log created by configure.

Prisp 02-22-2010 09:40 AM

Thx. I've tried both possibilities. I now get a conflict for GLib:

checking for GLIB - version >= 2.21.3...
*** 'pkg-config --modversion glib-2.0' returned 2.22.4, but GLIB (2.12.3)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files

The most recent installed GLIB configuration is located in '/usr/local/lib.pckconfig'; the original one in '/usr/lib/pkgconfig'.

irmin 02-22-2010 09:53 AM

It seems, that ld searches /usr/lib before /usr/local/lib for libglib.so. Because of this it tries to link the old glib library to the test program and this yields the error.

I'd suggest to do what is written in the output:
Code:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Or edit /etc/ld.so.conf and run ldconfig to make the change permanent. If this does not help, configure probably uses the old headers. In this case you should post config.log or configure.log so that we can help you.

knudfl 02-23-2010 09:39 AM

Please tell the purpose of installing new versions
of GLib, Pixman, Cairo, ATK, Pango and Gtk.


This is not an easy thing to handle. The system versions
are still present and will most certain disturb compiling.
If you against all odds get something build, it may also
be difficult to point to the required run time versions.
Unless all other dependencies also have a separate path.

And the new versions may trash the 500 installed applications
depending on the system versions. ( All gnome, etc.)

The usual approach is to configure all the new ones with e.g.
--prefix=/usr/local/glib2224/ . Then they will do no harm.
.....


All times are GMT -5. The time now is 07:11 PM.