the ØMQ installation guide advises those who want to build on Unix-like systems to choose Ubuntu as it's regarded as the most comfortable OS for developing.
However, since I have Debian in my VM, I decided to go for installing ØMQ in Debian and have a little headache on the way :). It was worth it, and it's simple. Just follow the guide :
the following are what you need to do :
- Make sure that libtool, autoconf, automake are installed.
- Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
- Unpack the .tar.gz source archive.
- Run ./configure, followed by make.
- To install ØMQ system-wide run sudo make install.
- On Linux, run sudo ldconfig after installing ØMQ.
1. Make sure that libtool, autoconf, automake are installed.
apt-get install libtool autoconf automake
2. Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed. Use the package manager for Debian, to check if you have them already installed in your system.
dpkg -s uuid-dev e2fsprogs
If they're are not installed, use the following command to install them :
apt-get install uuid-dev
apt-get install e2fsprogs
3. Download the current stable release (tar.gz source code) as provided on the ØMQ page and unpack it.
#tar -zxvf zeromq-3.2.2.tar.gz
4. Run ./configure, followed by make
(go to the unpacked source archive and run ./configure)
# cd zeromq-3.2.2/
# ./configure
This executable script will match the libraries on your computer with those required by zmq. Thus you will see a list of checks.
If at the end of the checks you get an error like " configure: error: Unable to find a working C++ compiler ", it's likely that trying to run 'make' will fail
# make
and you will get this error :
make: *** No targets specified and no makefile found. Stop.
Therefore you will need to get the C++ compiler or whatever that is missing.
# apt-get install g++
after installing g++ (c++) run again './configure' and make.
Now you are ready to write, compile and run your code ;-)
/if you you have written your code in C, simply do : /$ gcc -o myprogram myprogram.c -lzmq
$ ./myprogram
< -lzmq> when you compile your code, you need to add -lzmq , to tell the linker to link against zeromq.
No comments:
Post a Comment
Have your say!