在编译zeromq以支持libsodium时出现找不到libsodium包问题:checking for sodium... no执行"./configure --prefix=/usr --with-libsodium"出现:
[root@localhost zeromq-4.1.2]#./configure --prefix=/usr --with-libsodium
checking for sodium... no
configure: error: Package requirements (libsodium) were not met:
No package 'libsodium' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables sodium_CFLAGS
and sodium_LIBS to avoid the need to call pkg-config.
根据提示:查看PKG_CONFIG_PATH环境变量,
echo $PKG_CONFIG_PATH
此时问空,原来如此。
加上pkg-config路径即可
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
此时再次./configure就通过。