Install ZeroMQ on Ubunto 14.04.4 x64

Posted April 15, 2016 23.5k views

How Do I install ZeroMQ on a Ubuntu 14.04.4 x64 droplet ?

Tried installing git and cmake via apt-get and the followed
trying to install using cmake

I get the following error: CMake Error: The source directory “<directory>” does not appear to contain CMakeLists.txt.

If I’m going about the correctly, what should be my current directory when installing??

  • apt-get install zeromq will install ZeroMQ on any recent version of Ubuntu.

  • sudo apt-get install zeromq
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package zeromq

    Listings in the apt cache is the newest packages available (sudo apt-get update)

  • a stab in the dark, but looks like according the manual compilation instructions that you linked to, it asks to go one directory down to a directory called cmake-build and then do a cmake on the prior directory up with cmake .. && make -j 4

    So, it seems like you are supposed to go into cmake-build , and then run the cmake from there. I don’t know your level of Linux expertise, but I think it might be worth mentioning that cmake .. should be directing cmake to run on the files in the directory one level back up.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

It looks like the docs are missing a step. After cloning the repo, you’ll want to cd into the resulting directory and create cmake-build under it as CMakeLists.txt exists in the root of the repo.

  • git clone
  • cd libzmq
  • mkdir cmake-build && cd cmake-build
  • cmake .. && make -j 4
  • make test && make install && sudo ldconfig

kudos to person who has actually posted.

site ref:




get zeromq


unpack tarball package

tar xvzf zeromq-4.0.5.tar.gz

install dependency

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

in zeromq dir

cd zeromq-4.0.5

create make file


build and install(root permission only)

sudo make install

install zeromq driver on linux

sudo ldconfig

check installed

ldconfig -p | grep zmq (libc6,x86-64) => /usr/local/lib/ (libc6,x86-64) => /usr/local/lib/