Packages for Debian, Ubuntu, Fedora, CentOS, RHEL, SUSE
The ZeroMQ maintainers provide pre-built binary packages for libzmq, czmq, zyre, malamute, zproject and zproto, automatically built from both the latest stable releases OR the latest commit in the Git repositories via the Open Build Service for i386, amd64, armv7, arm64, ppc64, s390x (note: depends on the distribution).
Add the repository of your choice by clicking on the distribution and version, and then follow “Go to download repository”. That is the URL of the repository. Remember to add the GPG key.
For example, to add Debian 9 and install the development packages for libzmq from the latest stable release without draft APIs:
this will build czmq with libcurl, libmicrohttpd, lz4, as a 64-bit shared library.
To use the draft APIs, you may build czmq with draft feature:
vcpkg install czmq[draft]
If you are an adventurer, and want to always use the latest version of czmq, pass an extra --head option:
vcpkg.exe install czmq --head
These commands will also print out instructions on how to use the library from your MSBuild or CMake-based projects.
Requirements
ZeroMQ 2.2.x or later. We recommend to use ZeroMQ >= 3.
C++11 compliant compiler. (g++ >= 4.7)
The command line client and the tests also require libboost.
Installation
Installation can be done by the standard make && make install. If the boost
unittest framework is installed, check and installcheck can be run for sanity
checking. To use ZMQ4 security feature install libsodium and libzmq –with-libsodium
as shown below before ZMQPP.
Build, check, and install libsodium
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
./autogen.sh
./configure && make check
sudo make install
sudo ldconfig
cd ../
Build, check, and install the latest version of ZeroMQ
git clone git://github.com/zeromq/libzmq.git
cd libzmq
./autogen.sh
./configure –with-libsodium && make
sudo make install
sudo ldconfig
cd ../
Now install ZMQPP
git clone git://github.com/zeromq/zmqpp.git
cd zmqpp
make
make check
sudo make install
make installcheck
The most commonly useful overrides are setting CXX, to change the compiler
used, and PREFIX to change install location. The CXX prefix should be used on
all targets as the compiler version is used in the build path. PREFIX is only
relevant for the install target.
Example download is missing for cppzmq. Would you like to contribute it? Then follow the steps below:
Building requires a recent version of CMake (2.8.12 or later for Visual Studio, 2.8 or later for the rest), and a C++ compiler
which supports C++11. Currently this has been tested with -
Xcode 5.1 on OS X 10.8
Xcode 6 on OS X 10.9
Xcode 6.4 on OS X 10.10
Xcode 7.1 on OS X 10.11
GCC 4.8 + Boost 1.48 on CentOS 6
GCC 4.8 + Boost 1.53 on CentOS 7
GCC 4.8 on Arch Linux and Ubuntu
GCC 4.8 on Ubuntu
GCC 5.3 + Boost 1.60 on Ubuntu
Microsoft Visual Studio 2013 on Windows Server 2008 R2
Library dependencies are -
Boost 1.48 or later
ZeroMQ 4.0.x
Tests and example code require -
Boost 1.54 or later
To build on Linux / OS X -
$ mkdir build && cd build
$ cmake ..
$ make
$ make test
$ make install
You can also open Visual Studio solution from build directory after invoking CMake.
To change the default install location use -DCMAKE_INSTALL_PREFIX when invoking CMake.
To change where the build looks for Boost and ZeroMQ use -DBOOST_ROOT=<my custom Boost install> and -DZMQ_ROOT=<my custom ZeroMQ install> when invoking CMake. Or set BOOST_ROOT and ZMQ_ROOT environment variables.
Example download is missing for czmqpp. Would you like to contribute it? Then follow the steps below:
zmq4 is just a wrapper for the ZeroMQ library. It doesn’t include the
library itself. So you need to have ZeroMQ installed, including its
development files. On Linux and Darwin you can check this with ($ is
the command prompt):
$ pkg-config --modversion libzmq
4.3.1
The Go compiler must be able to compile C code. You can check this
with:
$ go env CGO_ENABLED
1
You can’t do cross-compilation. That would disable C.
Windows
Build with CGO_CFLAGS and CGO_LDFLAGS environment variables, for example:
The CZMQ library includes experimental classes that are not built by default, but can be built
by passing --enable-drafts to configure. Support for these draft classes are being added
to goczmq. To build these features against a CZMQ that has been compiled with --enable-drafts,
use go build -tags draft.
<dependency><groupId>org.zeromq</groupId><artifactId>jeromq</artifactId><version>0.5.3</version></dependency><!-- for the latest SNAPSHOT --><dependency><groupId>org.zeromq</groupId><artifactId>jeromq</artifactId><version>0.6.0-SNAPSHOT</version></dependency><!-- If you can't find the latest snapshot --><repositories><repository><id>sonatype-nexus-snapshots</id><url>https://oss.sonatype.org/content/repositories/snapshots</url><releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories>
Ant
To generate an ant build file from pom.xml, issue the following command:
mvn ant:ant
Example download is missing for JZMQ. Would you like to contribute it? Then follow the steps below:
We build wheels for macOS, Windows, and Linux, so you can get a binary on those platforms with:
pip install pyzmq
but compiling from source with pip install pyzmq should work in most environments.
Especially on macOS, make sure you are using the latest pip (≥ 8), or it may not find the right wheels.
If the wheel doesn’t work for some reason, or you want to force pyzmq to be compiled
(this is often preferable if you already have libzmq installed and configured the way you want it),
you can force installation with:
pip install --no-binary=:all: pyzmq
When compiling pyzmq (e.g. installing with pip on Linux),
it is generally recommended that zeromq be installed separately,
via homebrew, apt, yum, etc:
If the gem installation complains that it cannot find libzmq or headers, simply pass the location of your libzmq installation to the gem install command:
gem install zmq -- --with-zmq-dir=/opt/local
On Windows add a parameter for the libs. For example:
Note: Should the hash be wrong, remove the .hash field and the compiler error will show the correct value. Starting with Zig 0.12 you can also use zig fetch zzmq <url>.
It is also required to add it to the build.zig file:
const zzmq = b.dependency("zzmq", .{
.target = target,
.optimize = optimize,
});
// Note: starting with zig 0.12 the function will be
// `exe.root_module.addImport` instead of `exe.addModule`
exe.addModule("zzmq", zzmq.module("zzmq"));
exe.linkSystemLibrary("czmq");
exe.linkLibC();
Installing local dependencies
Installing CZMQ development library version 4.0 or higher is also required:
# Building on Ubuntu, PoP_OS, ZorinOS, etc.sudo apt install libczmq-dev
# Running on Ubuntu, PoP_OS, ZorinOS, etc.sudo apt install libczmq