How to install NS3 on Ubuntu 14.10

On the beginning, we need to install prerequisites as root

sudo apt-get install gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify doxygen graphviz imagemagick texlive texlive-latex-extra texlive-generic-extra texlive-generic-recommended texinfo dia texlive texlive-latex-extra texlive-extra-utils texlive-generic-recommended texi2html python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev python-pygccxml git  gir1.2-goocanvas-2.0-9

Then switch to the ordinary user (not root) and execute

mkdir ns3
cd ns3
tar xjf ns-allinone-3.22.tar.bz2
cd ns-allinone-3.22/

Note that you can find the latest version of NS3 on following link
In NS3, instead of using MAKE we use WAF build tool. So you need install NS3 by executing PYTHON or WAF scripts:


Please find along with other files.
Try to build the examples in ns-3 by executing

./ --enable-examples --enable-tests


./waf -d debug --enable-examples --enable-tests configure

You should receive following message if everything goes fine:

"Build finished successfully".

Finally to test is everything fine, please execute:


Or you can simply try to run some of the example tutorials:

./waf --run first