在編譯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就通過。