Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. What does this mean ?

share|improve this question
add comment

4 Answers

PKG_CONFIG_PATH is a environment variable which holds the path of pkg-config script. pkg-config program is used to retrieve information about installed libraries in the system.

To find the path use the command

locate pkg-config

and your results will be something like this

/usr/bin/pkg-config

To check the PKG_CONFIG_PATH value use the command echo $PKG_CONFIG_PATH

To set the PKG_CONFIG_PATH value use export PKG_CONFIG_PATH=/usr/lib/pkgconfig

share|improve this answer
add comment

The first answer is not technically explicit enough. From the man page (open a terminal, type man pkg-config):

pkg-config retrieves information about packages from special metadata files. These files are named after the package, and has a .pc extension. On most systems, pkg-config looks in /usr/lib/pkgconfig, /usr/share/pkgconfig, /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files. It will additionally look in the colon-separated (on Windows, semicolon-separated) list of directories specified by the PKG_CONFIG_PATH environment variable.

So the pkg-config program is not in the PKG_CONFIG_PATH directory; however, if you install a library, for the information to use it in an automake script to be accessible it needs to be in a directory pkg-config is aware of.

share|improve this answer
add comment

To see where pkg-config (version 0.24 or later) searches for installed libraries by default, use the following command:

pkg-config --variable pc_path pkg-config

To modify that path, set the PKG_CONFIG_PATH environment variable. The man file states PKG_CONFIG_PATH is:

A colon-separated (on Windows, semicolon-separated) list of directories to search for .pc files. The default directory will always be searched after searching the path; the default is libdir/pkgconfig:datadir/pkgconfig where libdir is the libdir where pkg-config and datadir is the datadir where pkg-config was installed.

share|improve this answer
add comment

It means you're trying to build something from source, and it can't find all of the dependencies it needs. The pkg-config script it uses to find the development files for those libraries, outputs this message.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.