ZeroMQ安装

Part 0:安装依赖库 libsodium

  git clone git://github.com/jedisct1/libsodium.git
  cd libsodium
  ./autogen.sh
  ./configure && make check
  sudo make install
  sudo ldconfig
  cd ..


Part 1:安装ZeroMQ

官方安装说明如下:

If you have free choice, the most comfortable OS for developing with ZeroMQ is probably Ubuntu.

  1. Make sure that libtoolpkg-configbuild-essentialautoconf, and automakeare installed.
  2. Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
  3. Unpack the .tar.gz source archive.
  4. Run ./configure, followed by make.
  5. To install ZeroMQ system-wide run sudo make install.
  6. On Linux, run sudo ldconfig after installing ZeroMQ.

To see configuration options, run ./configure --help. Read INSTALL for more details.


注意1:

运行./configure时会提示缺少libsodium依赖库,这是一个加密解密的库。

如果不想安装这个库,可执行以下命令跳过libsodium的安装。

 ./configure --without-libsodium


注意2:

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.
See the pkg-config man page for more details.

此时需要添加环境变量:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig


Part 2:安装CZMQ

官方安装说明如下:

./autogen.sh
./configure    
make -j 4
make check 
sudo make install && ldconfig



阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页