How to find where older version of GLIB has been installed?
Asked Answered
M

2

6

I am trying to install atk-2.4.0 and I get the error:

 'pkg-config --modversion glib-2.0' returned 2.32.3, but GLIB (2.26.1)
*** was found!

I also tried updating PKG_CONFIG_PATH to include the path of glib-2.0.pc but still same error appears. Could anyone help me how to find where 2.26.1 was installed I am relatively new to Ununtu? Thanks.

Marnie answered 27/6, 2012 at 14:10 Comment(8)
What is the output of this operation - find /usr/ -iname "*glib*.pc"? And dpkg -l libglib2.0-dev?Cupping
dpkg -l libglib2.0-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii libglib2.0-dev 2.26.1-0ubuntu Development files for the GLib libraryMarnie
@Cupping find /usr/ -iname "*glib*.pc" /usr/local/lib/pkgconfig/glib-2.0.pc /usr/lib/pkgconfig/glib-sharp-2.0.pc /usr/lib/pkgconfig/glib-2.0.pcMarnie
So you have glib version 2.26.1 installed through Ubuntu repositories but also you have installed version 2.32.2 from source (this is a guess based on the path being /usr/local/ which is the default configured path. So which version of glib do you need to use? What have you set PKG_CONFIG_PATH & LD_LIBRARY_PATH as?Cupping
@Cupping they were both empty, I guess I didn't set them correctly last time. But this time I set PKG_CONFIG_PATH to /usr/local/lib/pkgconfig and wasn't sure what to set LD_LIBRARY_PATH to. I am still getting the same error message.Marnie
If you need version 2.32.2 set PKG_CONFIG_PATH to /usr/local/lib/pkgconfig (which you have) & LD_LIBRARY_PATH to /usr/local/lib/Cupping
@Cupping Awesome, thank you. Do you know some good book or some other resource that I could use to better understand the kernel structure and the installation process, I have good programming foundation but know nothing about the kernel. By the way you could post your comment as an answer and I'll accept it. Thanks again for the help.Marnie
This SO post - https://mcmap.net/q/1633168/-linux-kernel-development-closed might give you pointers regarding kernel development, I am sorry but I am not qualified enough to suggest something on my own :)Cupping
C
10

Posting comments as response:
From find /usr/ -iname "*glib*.pc" it is found that there .pc file related to glib is available in /usr/lib/pkgconfig & /usr/local/lib/pkgconfig. Checking the system package management it appears that version 2.26.1 is installed from the repositories. The path for installation of glib from repositories is generally /usr/lib (This may vary a bit in case of 64 bit systems wherein there are different folders for 32 bit & 64 bit libraries). Thus it appears that glib also has been installed from source (guessing by installation path /usr/local/lib) which of version 2.32.2. If you need version 2.32.2 set PKG_CONFIG_PATH to /usr/local/lib/pkgconfig & LD_LIBRARY_PATH to /usr/local/lib/
Hope this helps!

Cupping answered 27/6, 2012 at 15:57 Comment(0)
C
5

You have to synchronize you PKG_CONFIG_PATH and LD_LIBRARY_PATH environment variables. Assuming that your prefix is /usr/local the followings should be set:

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
LD_LIBRARY_PATH=/usr/local/lib

You may also need to set other variables to compile glib dependent softwares:

ACLOCAL_PATH=/usr/local/share/aclocal/
PATH=/usr/local/bin:$PATH
Coparcenary answered 27/6, 2012 at 15:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.