Skip to content

Linux installation

David Mansolino edited this page Jan 10, 2020 · 53 revisions

Prerequisites Packages

The following Linux packages are needed and can easily be installed from the terminal:

sudo apt update
sudo apt install git g++ cmake execstack libusb-dev swig python2.7-dev libglu1-mesa-dev libglib2.0-dev libfreeimage-dev libfreetype6-dev libxml2-dev libzzip-0-13 libboost-dev libavcodec-extra libgd-dev libssh-gcrypt-dev libzip-dev python-pip libreadline-dev libassimp-dev pbzip2 libpci-dev

On Ubuntu 16.04:

sudo apt install libssl-dev libav-tools python3.5-dev

On Ubuntu 18.04:

sudo apt install libssl1.0-dev ffmpeg python3.6-dev python3.7-dev

Clone the Github Repository

Create the development directory in your home directory and clone the repository.

Note: instead of cloning https://github.com/cyberbotics/webots.git, we recommend to create your own fork and clone it, so that you can commit your changes directly on it.

cd ~
git clone --recurse-submodules https://github.com/cyberbotics/webots.git
cd webots

Setup your bash profile

Check the content of src/install_scripts/bashrc.linux and append it at the end of your ~/.bashrc:

cat src/install_scripts/bashrc.linux >> ~/.bashrc
source ~/.bashrc

Install Optional Dependencies [ optional ]

If needed, follow these instructions to install optional dependencies.

Build Webots

Compile Webots and automatically download the required resources in the depencencies folder:

make -jX

Note: X represents the number of threads for a speedy multi-threaded compilation. For example, type make -j12 on a CPU with four cores and hyper-threading.

make help displays additional targets for debugging, profiling, cleaning, etc.

Once compiled, type ./webots to launch it.

Clone this wiki locally