How to install ZeroMQ Package in Raspberry Pi (C/C++)

Untitled Document.md

How to install ZeroMQ package for Raspberry Pi (C/C++)

These installation steps are generally true for Ubuntu linux system.
You can get lastest file from this link. Once you unzip the file, there is INSTALL file inside the unziped folder. You can find Installation Instructions from there if you want to look for more options.

Download necessary packages

$ sudo apt-get install libtool pkg-config build-essential autoconf automake
Installation of libsodium package

Note: I try to install latest package libsodium-1.0.7 but make step fail for zeromq package.

Note: We need to install libsodium before the installation of zeromq

$ wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz
$ tar -zxvf libsodium-1.0.3.tar.gz
$ cd libsodium-1.0.3/
$ sudo ./configure
$ sudo ./configure
$ sudo make
$ sudo make install
Installation of zeromq package

$ cd ..
$ wget http://download.zeromq.org/zeromq-4.1.3.tar.gz
$ tar -zxvf zeromq-4.1.3.tar.gz
$ cd zeromq-4.1.3/
$ sudo ./configure
$ sudo make
$ sudo make install
$ sudo ldconfig

Note: If you want to use C++ binding to ZeroMQ package, you should install the following step. Then in your program, you can use #include <zmq.hpp> to run as C++ program.

$ cd /usr/include/
$ sudo wget https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp
Checking after the installation of both packages

$ cd /usr/local/lib
$ ls

You should see libsodium.so and libzmq.so after the last command $ ls. If you see all those files then we can call it as successful installation.



















No comments:

Post a Comment