-
-
Save katopz/8b766a5cb0ca96c816658e9407e83d00 to your computer and use it in GitHub Desktop.
Setup zeromq in Ubuntu 16.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
############################################################ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_));
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~