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

15,179

Solution 1

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!

Solution 2

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
Share:
15,179
mihajlv
Author by

mihajlv

Updated on June 04, 2022

Comments

  • mihajlv
    mihajlv almost 2 years

    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.