How to build & install libzmq without sudo
This set of shell commands will clone libzmq
v4.3.5
and build it without requiring root access to the system.
git clone -b v4.3.5 https://github.com/zeromq/libzmq.git
cd libzmq
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/usr
make -j$(nproc) install
It will install to $HOME/usr
. You can change this to any other location you prefer. When using $HOME/usr
, the headers will be installed in ~/usr/include
and the libraries in ~/usr/lib
etc.