LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-14-2004, 01:04 PM   #1
rlnd
Member
 
Registered: Aug 2004
Posts: 33

Rep: Reputation: 15
Pkg_config_path


Quote:
consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them
How can I do it ?
Thanks a lot.
 
Old 09-14-2004, 01:43 PM   #2
fatcat
LQ Newbie
 
Registered: Jan 2004
Posts: 10

Rep: Reputation: 1
For example if you are using bash:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

You can find default path like this:
locate pkg-config
and it usually is :
/usr/bin/pkg-config

You should knw where the new libraries are (=where to set PKG_CONFIG_PATH). This can give hins:
locate pkgconfig


I hope this helps ?
 
1 members found this post helpful.
Old 09-15-2004, 10:01 AM   #3
rlnd
Member
 
Registered: Aug 2004
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks a lot,that command works.
I've an old Glib-2.2.3 installed at prefix /usr
and the new Glib-2.4.6 at the prefix /usr/local .
Pango config shows this log >>>>>
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.4.0...
*** 'pkg-config --modversion glib-2.0' returned 2.4.6, but GLIB (2.2.3)
*** 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

I prefer keep also the old version of Glib , then how can I modify LD_LIBRARY_PATH
or what have I to put in /etc/ld.so.conf ???

Sorry...I'm a beginner......Thanks a lot in advance.
Regards.
 
Old 09-15-2004, 03:15 PM   #4
fatcat
LQ Newbie
 
Registered: Jan 2004
Posts: 10

Rep: Reputation: 1
both LD_LIBRARY_PATH and /etc/ld.so.conf contain list of directories to search for libraries.
LD_LIBRARY_PATH is higher preference, so it is checked first.
Just do
export LD_LIBRARY_PATH=/usr/local
or
export LD_LIBRARY_PATH=/usr/local/lib
depending where those libraries are. (/usr/lib is always searched since it is default location, so you do not have to put it there.)
If you need to define multiple library directories separate those with ;

You can also enter line
/usr/local/lib
or
/usr/local
into /etc/ld.so.conf but this is checked after the default location, so it probably does not help you.
for example I have:
cat /etc/ld.so.conf
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/sane
/usr/local/qt/lib
/usr/local/lib


man ld
might also be useful.
 
Old 09-16-2004, 11:35 AM   #5
rlnd
Member
 
Registered: Aug 2004
Posts: 33

Original Poster
Rep: Reputation: 15
Many thanks !
 
Old 09-29-2004, 03:27 PM   #6
zaipher
LQ Newbie
 
Registered: Aug 2004
Location: Norway
Distribution: Xubuntu/Ubuntu, Trustix, WinXPpro
Posts: 6

Rep: Reputation: 0
I just had the same problem - thanks guys, this thread really helped me out
 
Old 10-07-2004, 04:05 AM   #7
sir_nawaz959
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
Question Decoders in gstreamer programming

Hi,
My first prog. on gstreamer project is simpleAudioPlayer.c which is not working,perhaps due to decoder's problem.
The decoder plugin "mad" is NOT found as shows during execution .
How write to exact syntax and others requirements for that???

my code is:
include<gst/gst.h>
main(int argc, char *argv[ ])
{
GstElement *pipeline, *filesrc, *decoder, *audiosink;
gst_init(&argc, &argv);

if (argc != 2) {
g_print ("usage: %s <mp3 filename>\n", argv[0]);
exit (-1);
}
pipeline = gst_pipeline_new ("pipeline");
filesrc = gst_element_factory_make ("filesrc", "disk_source");
if(filesrc==NULL)
{
g_print("filesrc=NULL\n");
exit(-1);
}
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
decoder = gst_element_factory_make ("mad", "decode");
if(decoder==NULL)
{
g_print("decoder=NULL %x\n",decoder);
exit(-1);
}
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
decoder = gst_element_factory_make ("mad", "decode");// this does not do its job properly
if(decoder==NULL) //This statement seem to be true when i run the prog. why not mad could not found????
{
g_print(" decoder address=%x\n",decoder); //it prints : decoder address=0, always !!!
exit(-1);
}
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
audiosink = gst_element_factory_make ("osssink", "play_audio");
if(audiosink==NULL)
{
g_print("audiosink=NULL\n");
exit(-1);
}
g_objectt_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_bin_add_many (GST_BIN (pipeline), filesrc, decoder, audiosink, NULL);
gst_element_link_many (filesrc, decoder, audiosink, NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (gst_bin_iterate (GST_BIN (pipeline)));
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
exit (0);
}
compilation:
gcc simpleAudioPlayer.c -o myPlayer `pkg-config gstreamer --cflags --libs` // is this OK???
running as:
. /myPlayer myFavSongs
Output is:
decoder =0 // instead of sound , where is the problem?

Last edited by sir_nawaz959; 10-07-2004 at 04:07 AM.
 
Old 06-25-2005, 04:42 AM   #8
vladuz976
LQ Newbie
 
Registered: Jun 2005
Location: Los Angeles
Distribution: ubuntu
Posts: 4

Rep: Reputation: 0
Hi,
i get this problem during ./configure :

./configure: line 21810: PKG_PROG_PKG_CONFIG: command not found
pkg-config is not in your $PATH. Please ensure it is.
Read the manual page for you shell as to how to extend your path.
configure: error: Cannot find pkg-config

however i find this when i go env :

PKG_CONFIG_PATH=/usr/lib/pkgconfig


what can be wrong here? ./configure keeps giving me the same error

thanks



Quote:
Originally posted by fatcat
For example if you are using bash:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

You can find default path like this:
locate pkg-config
and it usually is :
/usr/bin/pkg-config

You should knw where the new libraries are (=where to set PKG_CONFIG_PATH). This can give hins:
locate pkgconfig


I hope this helps ?
 
Old 07-28-2005, 12:59 AM   #9
WRSpithead
Member
 
Registered: Mar 2005
Posts: 60

Rep: Reputation: 15
Quote:
Originally posted by vladuz976
i get this problem during ./configure :

./configure: line 21810: PKG_PROG_PKG_CONFIG: command not found
pkg-config is not in your $PATH. Please ensure it is.
check to see where your pkg-config executable is (or if it is installed). just do

whereis pkg-config

if it is installed it should show the path of the binary and the man pages. if the binary is in /usr/sbin or /sbin you will have to be root or use sudo to run ./configure. if it is in /usr/bin /bin or something else make sure that the $PATH variable has this directory included.
 
Old 07-24-2006, 05:24 AM   #10
viji2ks
LQ Newbie
 
Registered: Oct 2004
Location: india
Distribution: susi
Posts: 7

Rep: Reputation: 0
hai same proble old glib2.6.x with 2.4.8 what i can do

plz help me regard this

I've an old Glib-2.6.x installed at prefix /usr
and the new Glib-2.4.8 at the prefix /usr/local .
Pango config shows this log >>>>>
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.4.0...
*** 'pkg-config --modversion glib-2.0' returned 2.4.6, but GLIB (2.2.3)
*** 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

I prefer keep also the old version of Glib , then how can I modify LD_LIBRARY_PATH
or what have I to put in /etc/ld.so.conf ???

Sorry...I'm a beginner......Thanks a lot in advance.
Regards.[/QUOTE]
 
Old 06-28-2007, 07:49 AM   #11
mess_enger_guy
LQ Newbie
 
Registered: Jun 2007
Distribution: CentOS 5.0
Posts: 4

Rep: Reputation: 0
Thumbs up Thanks

Quote:
Originally Posted by fatcat
For example if you are using bash:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

You can find default path like this:
locate pkg-config
and it usually is :
/usr/bin/pkg-config

You should knw where the new libraries are (=where to set PKG_CONFIG_PATH). This can give hins:
locate pkgconfig


I hope this helps ?
Thanks fatcat, you saved my day
 
Old 08-06-2008, 07:36 AM   #12
mjalalynia
Member
 
Registered: Jul 2008
Posts: 48

Rep: Reputation: 15
hello all
i want install xfkc for xfce4.2.3.2 when i configure it this error appear :
checking XFCE4_UTIL_LIBS... -lxfce4util -lglib-2.0
checking for libxfcegui4-1.0 >= 4.3.99.1... found, but 4.2.3
*** The required package libxfcegui4-1.0 was found on your system,
*** but the installed version (4.2.3) is too old.
*** Please upgrade libxfcegui4-1.0 to atleast version 4.3.99.1, or adjust
*** the PKG_CONFIG_PATH environment variable if you installed
*** the new version of the package in a nonstandard prefix so
*** pkg-config is able to find it.

i have this Package installed:
[root@localhost ~]# rpm -qa |grep libxfcegui4
libxfcegui4-4.4.2-1.fc8
libxfcegui4-devel-4.4.2-1.fc8
is it a good version for me?
and i have:
[root@localhost ~]# locate pkg-config
/usr/bin/pkg-config
/usr/share/man/man1/pkg-config.1.gz
/usr/share/zsh/4.3.4/functions/_pkg-config

and with:
[root@localhost ~]# locate pkgconfig
/usr/local/lib/pkgconfig
/usr/share/pkgconfig
... (many directory)

which directory should i choose for this line:
export PKG_CONFIG_PATH=(directory???)
and should i type this line in terminal ?i do this but nothing down .what should i do?
 
Old 08-06-2008, 07:56 AM   #13
jeet3886@rediffmail.
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
firsly i want to install gnu c compiler on my desktop pc but i fail to install gcc compiler after installing linux8.please help me in this regard
 
Old 08-06-2008, 09:02 AM   #14
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
jeet3886@rediffmail.
Please do not take over other peoples threads - create your own and give it a meaningful title.
Also try reading documentation for your distribution first - they tell you how installing software is handeled.
linux8 is not a distributions name BTW
 
Old 01-01-2009, 07:07 PM   #15
pril
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
saved me!

I hope you see this.. Thank you very much dude. your example were very helpful.







Quote:
Originally Posted by fatcat View Post
For example if you are using bash:
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

You can find default path like this:
locate pkg-config
and it usually is :
/usr/bin/pkg-config

You should knw where the new libraries are (=where to set PKG_CONFIG_PATH). This can give hins:
locate pkgconfig


I hope this helps ?
 
  


Reply



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 Kiwi UK Linux - Software 5 12-18-2004 01:36 PM
PKG_CONFIG_PATH and other questions pbibb1657 Mandriva 2 11-23-2004 03:58 PM
Pkg_config_path box_l Mandriva 3 08-03-2004 04:53 AM
pkg_config_path export MultiMike Linux - Newbie 3 10-16-2003 01:40 AM
Pkg_config_path kilgore_trout Linux - Software 0 09-08-2003 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:22 PM.

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