创建setup文件
#!/bin/sh sudo apt-get install gcc g++ python -y sudo apt-get install gcc g++ python python-dev -y sudo apt-get install mercurial -y sudo apt-get install bzr -y sudo apt-get install gdb valgrind -y sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl -y sudo apt-get install flex bison libfl-dev -y sudo apt-get install g++-3.4 gcc-3.4 -y sudo apt-get install tcpdump -y sudo apt-get install aqlite aqlite3 libsqlite3-dev -y sudo apt-get install libxml2 libxml2-dev -y sudo apt-get install libgtk2.0-0 libgtk2.0-dev -y sudo apt-get install vtun lxc -y sudo apt-get install uncrustify -y sudo apt-get install doxygen grphviz imagemagick -y sudo apt-get install texlive texlive-extra-untils texlive-latex-extra -y sudo apt-get install python-sphinx dia -y sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev -y sudo apt-get install libboost-signals-dev libboost-filesystem-dev -y sudo apt-get install openmpi* -y
保存脚本文件,加权限并运行
chmod +x mysetup
./mysetup
切换到NS3解压目录
./build.py