These instructions are for Debian and its derivatives (Ubuntu, etc) GNU/Linux distributions. For other distributions the installation from sources is mostly the same, but you will need to figure out how to install the dependencies on your system.
Add www.icub.org to your sources.list.
On Ubuntu:
(replace focal
with the code name of the installed version).
On Debian:
(replace buster
with the code name of the installed version).
Import the repository public key:
Update the list of packages and install YARP.
You are now ready to check you installation, see Check your installation.
Install the following packages to prepare your development environment and get basic dependencies:
(Please note that you need some extra step to install CMake 3.12 on Debian 9 and Ubuntu 18.40, see robotology/QA#364
Install YCM from sources or install it from binaries by configuring the icub.org repository (Follow the instructions at Install from binaries), and install it with
Depending on what parts of YARP you want to enable, you will also have to install some other packages
For convenience's sake, all the required and most optional packages can be installed with this command line, if you want to go into further details about what is installed and why, proceed to the following sections.
Installing the following packages is recommended:
On Debian/Ubuntu the following Qt5 packages are required to build and run YARP GUIs:
QCustomPlot is also optionally required for yarpscope
:
Graphviz is required for yarpviz
The jpeg library is required to build the mjpeg
carrier
GStreamer is required to enable the h264 carrier
See also How to install Gstreamer
To get the source you can download the latest release at https://github.com/robotology/yarp/releases/ or clone YARP git repository from one of the following addresses:
For example:
By default the master
(development) branch is cloned, if you need a stable branches they are named yarp-<version>
. For example
Generate makefiles using CMake:
Usually you want to check in the CMake output that "Compile GUIs" and "Compile YARP_math library" are enabled, if they are not, you are probably missing some dependency.
Compile:
You are now ready to check you installation, see Check your installation.
CMAKE_INSTALL_PREFIX
option (default is /usr/local
). If you install YARP in a system directories, or if you use the LD_LIBRARY_PATH
environment variable, you might want to disable the RPATH. In order to do this, you have to enable the CMAKE_SKIP_INSTALL_RPATH
option in cmake.YARP_DIR
and YARP_DATA_DIRS
environment variables to point to the installation directory, see Setup your environment.If you have installed YARP in default location you can skip to Check your installation.
If you are using YARP without installing it or you have installed it in a custom location, or you have disabled RPATH, you have to tweak your environment (edit your ~/.bashrc
or similar) to:
YARP_DIR
to the location where you installed YARP (or CMake's build directory if you did not perform the installation step) to allow cmake to find YARP easily for your own projects. Set YARP_DATA_DIRS
to $YARP_DIR/share/yarp
.YARP_DIR/bin
to PATH
to allow your shell to find YARP programs.YARP_DIR/lib
to LD_LIBRARY_PATH
to allow YARP programs to find YARP libraries, if you enabled CMAKE_SKIP_INSTALL_RPATH
and did not install in a system directory.