Steps for install the ZCM on Ubuntu 16.04
- Prepare python-pip
sudo apt-get install python-pip # if pip not installed sudo easy_install pip # if not upgraded to newer version than default, which is needed by ZCM.
- Download the official tarball from master branch or specific version from github.
- Extract it and install the dependencies automatically
$ tar -xzf ZeroCM-zcm-<hash>.tar.gz # you got to substitute the <hash> $ cd ZeroCM-zcm-<hash> $ sudo ./scripts install-deps.sh # grab yourself a cup of coffee, because this may cost a while, and if you meet an error with pip, try `sudo easy_install pip` again.
- Configure environment
or something like$ ./waf configure --use-all
$ ./waf configure --use-java --use-python --python=/usr/bin/python3.6 --use-zmq --use-elf --use-third-party --use-ipc --use-inproc --use-udpm --use-serial
- it may ask for a setting of JAVA_HOME environment variable, try to add this to your
~/.bashrc
and then source it:export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 # you should find something similar under /usr/lib/jvm/. export PATH=$JAVA_HOME/bin:$PATH
- run
./waf build
, and you should see the notice “‘build’ finished successfully”. Then runsudo ./waf install
and you are fine.
After installation, commonly you can find your library in /usr/local/lib/libzcm.so
and headers in /usr/local/include/zcm/
. Use -lzcm
with g++, include_directories(...)
and target_link_libraries(target zcm)
in CMake.