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.pcisn't in the pkgconfig search path. You may have installed libsamplerate under/usr/localor somewhere else that is outside the defaultpkg-configsearch path.Options:
Install libsamplerate from your distribution (if it exists) so
samplerate.pcis installed in one of the default pkgconfig directories.Set PKG_CONFIG_PATH to enable
pkg-configto findsamplerate.pc:First, find where the
samplerate.pcis installed (maybe/usr/local/lib/pkgconfig?). Then setPKG_CONFIG_PATH:pkg-configshould find the config now../configure --prefix /usr. This will install it along other system libraries, but makes it much harder to uninstall. NOT RECOMMENDED