如何从源代码在Ubuntu 16.10上安装ZeroMQ 4

时间:2016-12-22 18:30:34

标签: ubuntu compilation zeromq

如何在源文件中 Ubuntu 16.10 上安装 ZeroMQ 4

1 个答案:

答案 0 :(得分:3)

您可以使用以下bash脚本在 Ubuntu 16.10 计算机上安装 ZeroMQ 4

#!/usr/bin/env bash

# Exiting on errors
set -e

# Set required version
VERSION="4.2.0"

# Asking for sudo password
sudo whoami

echo "Downloading ZeroMQ"
wget https://github.com/zeromq/libzmq/releases/download/v${VERSION}/zeromq-${VERSION}.tar.gz

echo "Unpacking"
tar xvzf zeromq-${VERSION}.tar.gz

echo "Installing dependencies"
sudo apt-get update && \
sudo apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev

echo "Changing directory"
cd zeromq-${VERSION}

echo "Configuring"
./configure

echo "Compiling"
make

echo "Installing"
sudo make install

echo "Installing ZeroMQ driver"
sudo ldconfig

echo "Checking installation"
ldconfig -p | grep zmq

只需将版本字符串更改为所需的字符串即可!

Here's the Gist for future reference.