web-dev-qa-db-fra.com

Comment résoudre une ancienne erreur GLIB

Je suis en train d'installer GTK +, mais il nécessite plusieurs conditions préalables. Ceux-ci sont

  • glib - 2.0> = 2.35.3
  • atk -> = 2.7.5
  • Pango-> = 1.32.4
  • gdk-pixbuf-2.0> = 2.27.1

Maintenant, j'ai mis à niveau mon glib-2.0 vers la version 2.38.2 et j'ai déjà essayé de mettre à jour atk, pango et gdk-pixbuf

checking for GLIB - version >= 2.31.2... 
'pkg-config --modversion glib-2.0' returned 2.38.2, but GLIB (2.32.4)
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

configure: error: 
GLIB 2.31.2 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.

Cela fait quelques heures que je tourne en rond pour essayer de faire fonctionner cela. Si quelqu'un pouvait aider, ce serait très apprécié. Merci d'avance

5
Hakim_Djzarie

J'ai le même problème que vous.

Je règle PKG_CONFIG_PATH et LD_LIBRARY_PATH comme

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

voir https://stackoverflow.com/questions/11228173/how-to-find-where-older-version-of-glib-has-been-installed

Mais ça n'a pas marché. Ensuite, j'ai trouvé quelqu'un le résoudre comme

echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

voir http://www.linuxquestions.org/questions/linux-software-2/how-to-set-ld_library_path-pkg_config_path-and-glib_config-937732/

Et ça a marché!

3
Seyer

J'ai testé cela tellement de fois, et j'ai vérifié que si nous installions glib à partir de la source, nous devions avoir les options suivantes:

  1. Si avec do ./configure --prefix=/usr --with-pcre=system, comme dans instructions , cela signifie que nous avons installé glib dans /usr/lib path. Donc, nous devons faire export LD_LIBRARY_PATH=/usr/lib.
  2. Si nous n'utilisons pas --prefix=si le chemin par défaut est /usr/local/lib/. Donc, si pkg_configfinds deux bibliothèques installées nous devons faire export LD_LIBRARY_PATH=/usr/local/libsi nous avons installé dans le chemin par défaut.

J'espère que ça aide quelqu'un.

0
R. Rodrigues