LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   pkg-config version is reported incorrect after install (Mandriva 10.2) (http://www.linuxquestions.org/questions/linux-software-2/pkg-config-version-is-reported-incorrect-after-install-mandriva-10-2-a-439776/)

Luna-tic 04-28-2006 03:41 PM

pkg-config version is reported incorrect after install (Mandriva 10.2)
 
I have just installed Mandriva 10.2 Limited Edition and I downloaded pkg-config version 0.20. I installed it, but when I call "pkg-config --version", I get "0.15.0"... :\

Any help?

bathory 04-28-2006 04:02 PM

You should have installed it over the old version, i.e. using:
Code:

./configure --prefix=/usr
if pkgconfig was installed under /usr/lib/pkgconfig. If you don't want to reinstall you have to set the PATH and PKG_CONFIG_PATH accordingly, i.e .if you installed the newer version in /usr/local (the default) then:
Code:

export PATH=/usr/local/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH


Luna-tic 04-28-2006 04:26 PM

Thanks, it helped!
It helped, but I still have a problem. I installed GLIB-2.8.6 and when I type "pkg-config --modversion glib-2.0", I get:
Code:

Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found

I tried looking for glib-2.0.pc file, but I only found it in the directory from which I compiled GLIB.

Luna-tic 04-28-2006 04:30 PM

UPDATE: I managed to find it in usr/local/lib/pkgconfig directory...

bathory 04-28-2006 04:33 PM

There should also one in /usr/lib/pkgconfig (the one that came with the OS installation). So now you have 2 versions of glib-2.

Luna-tic 04-28-2006 04:46 PM

Not good, I take it :\ How can I remove the old one ?

bathory 04-28-2006 04:56 PM

You should use the Mandriva package manager (I think it's urpmi) to remove it.
But, I suggest you to uninstall the software you have installed from source (pkgconfig and glib2) and use that package manager to update to the newer versions. Because later you're going to fall in various dependencies that are not satisfied by the way you have compiled the sources.

Regards

Luna-tic 04-29-2006 06:25 AM

Those two programs don't show up in the package list, so I can't remove them like RPMs.. Plus, when I rebooted, I had the same trouble with pkg-config version. Why is that ?

bathory 04-29-2006 08:31 AM

Quote:

when I rebooted, I had the same trouble with pkg-config version. Why is that ?
In order to be able to use always the environment variables you set, you must either put them in /etc/profile to be valid for all users, or to a user's ~/.profile (or ~/.bashrc, or ~/bash_profile whatever your distro uses) to be valid for that user. I suggest you to put them in /etc/profile, i.e. edit /etc/profile and add the 2 "export" statements there. Also if you go on with installing software from source in /usr/local (I'm also doinig so;) ) you must put "/usr/local/lib" in your /etc/ld.so.conf to be able to use the libraries you're installing there.


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