Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Linux Installation

Greg Cowan edited this page Oct 20, 2016 · 3 revisions

Foreword

This guide should serve as a starting point for installation of the dependencies for our project for most distros of Linux. However, it only gives specific information about installing on modern releases of Ubuntu.

Dependencies

You'll need a bunch of dependencies for SUMO, OMNet++, and Veins. The exact dependencies will depend on your distro. But they will be:

  • build_essential, make, gcc, g++, bison, flex, perl, configure, autotools
  • python
  • Tcl, tk
  • LibXML or Expat
  • JDK / JRE (java)
  • Qt4
  • OpenSceneGraph, osgEarth
  • GraphViz, Doxygen
  • MPI
  • Pcap

On Ubuntu just run:

sudo apt-get install build-essential gcc g++ bison flex perl tcl-dev tk-dev blt libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-1.0-0 openmpi-bin libopenmpi-dev libpcap-dev autoconf automake libtool libproj libgdal1-dev libfox-1.6-dev libgdal-dev libxerces-c-dev

On newer versions you might need to install libproj0-dev instead of libproj0.

SUMO

Now we can install SUMO. If you aren't on Ubuntu or want to install from source see the SUMO WIKI. However, installing on Ubuntu is as easy as:

sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools sumo-doc

Then export the environment variable SUMO_HOME by opening up your .bashrc or .zshrc and appending this:

export SUMO_HOME=/usr/share/sumo/

Now run sumo --version to check that it installed properly. You should have Version 0.25.0 or greater.

OMNeT++

Again, check out the great OMNeT++ Install Guide for more thorough documentation. A synopsis is provided here. Everyone will need to install OMNeT++ from source. First, download the latest version. I saved it in ~/src. Then, unpack it with:

tar xvfz omnetpp-X.X-src.tgz

Replacing the Xs with the version number. Then, cd to the newly unpacked directory and run:

. setenv

Next, add OMNeT++'s bin folder to your path. It depends on your install location, but for me I added the line below to my .bashrc:

export PATH=$PATH:/$HOME/src/omnetpp-4.6/bin/

Now reload your terminal or source ~/.bashrc.

Next is to compile the source code. Run these commands in that unpacked directory:

./configure
make

Now assuming everything went well you should be able to open the IDE with:

omnetpp

You can get a menu item or a desktop shortcut for the OMNeT++ IDE with:

make install-menu-item
make install-desktop-icon

Veins

Veins source can be downloaded as a zip and extracted in ~/src/. and built in the OMNeT++ IDE. First import Veins with File > Import > General: Existing Projects into Workspace, then build it with Project > Build All or Ctrl+B.

Verification

To make sure everything is working, cd ~/src/veins-4.4/examples/veins/ and run:

sumo_gui -c erlang.sumo.cfg

Now that SUMO is verified, we can test the whole thing by running the Veins example. In the OMNeT++ IDE open up veins/examples/veins in the project explorer. Right click on the omnetpp.ini file and Run As > OMNeT++ Simulation. This should start a window that when played will simulate some cars communicating. For more information see our tutorials.