【問題】SUSE已經安裝了libsodium,安裝zeromq時出現下面的錯誤?


1.【問題】SUSE已經安裝了libsodium,安裝zeromq時出現下面的錯誤?

checking for libsodium... no
configure: error: Package requirements (libsodium >= 0.0.0) 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 libsodium_CFLAGS
and libsodium_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

解決辦法:

由於使用的普通用戶,且是64位的系統.

64位操作系統的so文件通常放在/usr/lib64,而不是/usr/lib。

所以需要這樣:

a.安裝libsodium

通過CC變量使用64位的gcc編譯器。

sudo tar zxf libsodium-1.0.2.tar.gz ;cd libsodium-1.0.2 ;sudo ./configure CC="gcc -m64" --prefix=/usr --libdir=/usr/lib64 && sudo make && sudo make install

b.安裝zeromq

通過CC變量使用64位的gcc編譯器

sudo tar zxf zeromq-4.1.3.tar.gz ;cd zeromq-4.1.3 ;sudo ./configure --prefix=/usr CC="gcc -m64" PKG_CONFIG_PATH="/usr/lib64/pkgconfig" --libdir=/usr/lib64 && sudo make && sudo make install

PKG_CONFIG_PATH參數是添加一個pkgconfig文件的搜索目錄。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM