Skip to Content

./configure - sndfile error

3 replies [Last post]
Chestah
Offline
Joined: 04/17/2010

checking for sndfile... Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
configure: error: "sndfile library not found. Website: http://www.mega-nerd.com/libsndfile/"
bash-2.05b#

I downloaded and installed sndfile and the sndfile.pc file in located at /usr/local/lib/pkgconfig/sndfile.pc, how do i add it to the PKG_CONFIG_PATH variable :S how do i fix this?

bennyp
Offline
Joined: 04/17/2010

You are using BASH:

to check your PKG_CONFIG_PATH type

echo $PKG_CONFIG_PATH

if /usr/local/lib/pkgconfig/ is not in the output of echo, you can add it to your PKG_CONFIG_PATH like this

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

you can make this permanent by adding it to your profile:

echo PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH >> ~/.profile
echo export $PKG_CONFIG_PATH >> ~/.profile

Chestah
Offline
Joined: 04/17/2010

bash-2.05b# PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
bash-2.05b# export $PKG_CONFIG_PATH
bash: export: `/usr/local/lib/pkgconfig/:': not a valid identifier

but ls -l gives:
bash-2.05b# ls -l /usr/local/lib/pkgconfig/
total 4
-rw-r--r-- 1 root root 249 2004-12-15 18:54 sndfile.pc
bash-2.05b#

Chestah
Offline
Joined: 04/17/2010

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig worked :)