I stumbled upon a problem when I was trying to install gosamplerate for my project. I was following installation manual on the repository https://github.com/dh1tw/gosamplerate but after succesfully installing libsamplerate0, I get error response while trying to execute go get github.com/dh1tw/gosamplerate:
# pkg-config --cflags -- samplerate
Package samplerate was not found in the pkg-config search path.
Perhaps you should add the directory containing `samplerate.pc'
to the PKG_CONFIG_PATH environment variable
No package 'samplerate' found
pkg-config: exit status 1
Can anyone help me resolve this issue?
This particular error is unrelated to Go and indicates
samplerate.pc
isn't in the pkgconfig search path. You may have installed libsamplerate under/usr/local
or somewhere else that is outside the defaultpkg-config
search path.Options:
Install libsamplerate from your distribution (if it exists) so
samplerate.pc
is installed in one of the default pkgconfig directories.Set PKG_CONFIG_PATH to enable
pkg-config
to findsamplerate.pc
:First, find where the
samplerate.pc
is installed (maybe/usr/local/lib/pkgconfig
?). Then setPKG_CONFIG_PATH
:pkg-config
should find the config now../configure --prefix /usr
. This will install it along other system libraries, but makes it much harder to uninstall. NOT RECOMMENDED