Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
While doing ./configure on one of the dependencies for GTK (ATK) I get an error message that looks like the following:
*** 'pkg-config --modversion glib-2.0' returned 2.4.0, but GLIB (2.2.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
no
configure: error:
*** GLIB 2.0.0 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.
At first pkg-config couldn't find glib so I copied glib-2.0.pc from /usr/local/lib/pkgconfig/ to /usr/lib/pkgconfig/ since I never got the PKG_CONFIG_PATH variable to work proporly.
Now I have only installed 2.4.0 on my set, nothing else. A "find / -name glib-2.0.pc" only returns the files that has to do with 2.4.0 so how can I have 2.2.3 installed? How do I get past this?
Here is a thread where DOCta_Gnome worked through the problem. I am not sure which "solution" actually solved the problem. I suspect that the problem was mismatched versions of the glib source and binary .
Since I'm on a debian set I couldn't follow that thread exactly. I did however have two pkgconfig installed so I removed one and only used the one referred to by the gtk homepage. It didn't solve the problem.
By reading the thread you gave me jailbait I assume the either some headerfiles in the glib-2.4.0 I installed are faulty and describes the glib as being 2.2.3 Another option is that I have glib-2.2.3 installed and that it came when installing some other package but that seems unlikely since the sites I have in my /etc/apt/sources.list doesn't have the glib package (at least I can't find it) and I know I have compiled any glib myself except 2.4.0 so if I have it, it would have come as a depency when installing with the apt-get command.
So, the problem persists and I'm lost on how to fix it.
"By reading the thread you gave me jailbait I assume the either some headerfiles in the glib-2.4.0 I installed are faulty and describes the glib as being 2.2.3 Another option is that I
have glib-2.2.3 installed."
You might be able to find out what the problem is by reading glib-2.0.pc (this is a text file). On my Fedora this file is at /usr/lib/pkgconfig/glib-2.0.pc. If your Debian file tree is different than mine then look for the directory called pkgconfig and read any file in pkgconfig which starts with "glib".
"So, the problem persists and I'm lost on how to fix it."
Once you figure out what version of both the binary and source glib you have installed and what you really need you will probably have to delete the source and install the right one by hand instead of using apt. I don't know how to do that on Debian.
The glib-2.0.pc was first located in /usr/local/lib/pkgconfig/ The pkg-config couldn't find it then, so I copied the file into /usr/lib/pkgconfig/ and that was when I got this error message about version 2.2.3
I've looked at the glib-2.0.pc files I have (in both directories to be sure) and they belong to version 2.4.0, that's why pkg-config --modversion glib-2.0 returned 2.4.0.
I haven't installed glib with 'apt-get install', at least not to the best of my knowledge. Also I can't seem to find glib with a 'apt-cache search' either so how could I have installed it? I did install it with the source code though so my best guess is still that some file is faulty referring to version 2.2.3 that I don't seem to have.
I havn't done a find /usr -iname glib* yet since I'm not at home right now (how do you type a * with putty, it didn't seem to like a * being typed the usual way). I'll try it soon though and will report if it changes my mind about anything, doubt it though since I have done other finds and have looked a lot through my set.
"Let's say I did have GLIB 2.2.3, how would I go about uninstalling it?"
You have three things to consider. The first is what binary version of glib do you have? You do not want to change the binary version.
The second is what source version of glib do you have? If the source version is different than the binary version then you want to remove the soure of glib and install the source version that matches the binary version.
Third, what version of the source is glib pkgconfig pointing to? ./configure looks at pkgconfig to decide ehich version of the source package to look at. It is possible to have the correct verion of the glib source installed and ./configure to fail when pkgconfig points to the wrong version. The file glib configuration file in pkgconfig is provided by a package called glib2-dev in Fedora. This is the glib 2.x source package. So if you have the correct glib source installed but pkgconfig points to the wrong source version then you should remove the glib source packafge, make sure that the glib pkgconfig file is deleted, and then reinstall the correct glib source package.
"I havn't done a find /usr -iname glib* yet since I'm not at home right now (how do you type a * with putty, it didn't seem to like a * being typed the usual way). "
That is a typo. The line:
find /usr -iname "glib*"
should be:
find /usr -iname "*glib*"
I will edit the mistake.
I did it the easy way and followed comp12345s tip. It worked. So now I probable have two glib-2.4 installed, one done with apt-get and one with source I compiled locally. Hopefully this won't cause any problems in the future though it very well might...
Thanks for the help provided!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.