Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This 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.


  Search this Thread
Old 12-17-2004, 07:04 PM   #1
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
PKG_CONFIG_PATH environment

I am trying to ./configure libgtk+2.4.14. When I run ./configure, this is what I get:

checking for glib-2.0 >= 2.4.0 atk >= 1.0.1 pango >= 1.4.0... Package atk was not found in the pkg-config search path.
Perhaps you should add the directory containing `atk.pc'

to the PKG_CONFIG_PATH environment variable
No package 'atk' found

configure: error: Library requirements (glib-2.0 >= 2.4.0 atk >= 1.0.1 pango >= 1.4.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

As I bolded, the atk package cannot be found. I did the default installation of glib, atk, and pango. Only atk is giving me a pain. So I installed the atk package with ./configure --prefix=/home/ken/atk and it installed fine. Now how do I tell gtk+2.4.14 to look for the atk package in /home/ken/atk/lib/pkgconfig/atk.pc ? That is where the file is located. I typed pkg-config --help but I don't understand how to use it.

Thanks for the help
Old 12-17-2004, 07:48 PM   #2
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
You'll need to set more than your PKG_CONFIG_PATH if you want to link against a library installed somewhere unusual like that...
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/ken/atk/lib/pkgconfig
export LD_LIBRARY_PATH=/home/ken/atk/lib
export LDFLAGS="-L/home/ken/atk/lib"
export CPPFLAGS="-I/home/ken/atk/include"

I think you're wise to be cautious and install stuff in your home first. I often do that with things I'm not sure about. If you install anything else in your home it may be wise to also use ./configure --prefix=/home/ken/atk or else you're going to have to expand those four PATHs to include extra libraries...
If you close the shell/terminal you'll need to reset those variables if you want to carry on compiling. Also, if you install something that was linked against /home/ken/atk/lib it won't run (unless it likes the libs in /usr/lib) unless you first export LD_LIBRARY_PATH=/home/ken/atk/lib so you may need to add that line to the top of the script that launches whatever it is you're installing.
Old 12-17-2004, 07:50 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
export PKG_CONFIG_PATH='/home/ken/atk/lib/pkgconfig' will set the environment variable and should get you on your way. I find it useful to install things like this in the "standard" dir (usually /usr/lib/pkgconfig) to save from having to mess with this. of course, if you don't have root you have little choice.
Old 12-17-2004, 07:57 PM   #4
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Thanks for the solution! I normally let the ./configure do it's default thing, but for some reason the atk package would not install correctly so I just put it in my /home directory, which it did work. Maybe I wasn't running as root when I configured it. I don't know, but this will work. Thanks!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"PKG_CONFIG_PATH environment variable" huh? plz help David_g17 Linux - Software 3 09-30-2004 06:33 PM
PKG_CONFIG_PATH environment variable mohapi Linux - Software 8 01-11-2004 08:05 PM
Where is the PKG_CONFIG_PATH environment variable? jdruin Linux - Software 4 12-05-2003 08:31 PM
PKG_CONFIG_PATH environment variable hyperriven Linux - Software 2 10-24-2003 08:29 PM
Pkg_config_path kilgore_trout Linux - Software 0 09-08-2003 12:18 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration