I got the same error when trying to compile a Go package on Debian 9.8:
# pkg-config --cflags -- libssl libcrypto
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
The thing is that pkg-config
searches for package meta-information in .pc
files. Such files come from the dev package. So, even though I had libssl
installed, I still got the error. It was resolved by running:
sudo apt-get install libssl-dev