Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
sudo apt-get update && \
sudo apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev
# Create make file
cd zeromq-4.2.2
./configure
# Build and install(root permission only)
sudo make install
# Install zeromq driver on linux
sudo ldconfig
# Check installed
ldconfig -p | grep zmq
# Expected
############################################################
# libzmq.so.5 (libc6,x86-64) => /usr/local/lib/libzmq.so.5
# libzmq.so (libc6,x86-64) => /usr/local/lib/libzmq.so
############################################################
@y2kbadbug

This comment has been minimized.

Copy link

@y2kbadbug y2kbadbug commented Feb 19, 2019

Small note, bash is in /bin/bash not /usr/bin/bash with Ubuntu Xenial.

@soccerdroid

This comment has been minimized.

Copy link

@soccerdroid soccerdroid commented Sep 3, 2019

Should add the stepts to install libsodium, which is a dependency. Installed it following this gist

@katopz

This comment has been minimized.

Copy link
Owner Author

@katopz katopz commented Sep 4, 2019

Should add the stepts to install libsodium, which is a dependency. Installed it following this gist

Ref : https://gist.github.com/cdjhlee/b8e3c927a01b0948b42d#gistcomment-2560156

@mhusme

This comment has been minimized.

Copy link

@mhusme mhusme commented Jul 10, 2020

If you are into binaries only then you can try as follows

echo "deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/ ./" >> /etc/apt/sources.list
wget https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/Release.key -O- | sudo apt-key add
apt-get install libzmq3-dev

If you get a permission error then you can try as follows (you need to have superuser access)

sudo -i
echo "deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/ ./" >> /etc/apt/sources.list
wget https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/Release.key -O- | sudo apt-key add
exit
sudo apt-get install libzmq3-dev

ref: http://wiki.zeromq.org/intro:get-the-softwarehttp://wiki.zeromq.org/intro:get-the-software

@menghuiwu

This comment has been minimized.

Copy link

@menghuiwu menghuiwu commented Sep 23, 2020

Suggest to update the zeromq version to 4.2.5 to prevent the compile error as follows:
g++ (Debian 8.3.0-6) 8.3.0 on Debian 10.3
make[1]: Entering directory '/home/menghui_wu/dev/edgex/zeromq-4.2.2'
CXX src/src_libzmq_la-msg.lo
In member function 'int zmq::msg_t::set_group(const char*, size_t)',
inlined from 'int zmq::msg_t::set_group(const char*)' at src/msg.cpp:549:22:
src/msg.cpp:560:13: error: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
strncpy (u.base.group, group_, length_);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/msg.cpp: In member function 'int zmq::msg_t::set_group(const char*)':
src/msg.cpp:549:22: note: length computed here
return set_group (group_, strlen (group_));
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment