and extract the contents into a folder with the same name. • Open the folder • Cd home/masud/ns-allinone-2.34 • Masud is my username. Enter your usernameinstead of masud. • Sudo apt-get install build-essential autoconf automake libxmu- dev gcc-4.3 Install NS-2 on ubuntu 3
downgrade the GCC to the version of: 4.3 • Go to your ns-2 folder • Sudo gedit ns-allinone-2.34/otcl-1.13/Makefile.in • Apply these changes to the makefile.in • Change CC= @CC@ to CC=gcc-4.3 Install NS-2 on ubuntu 4
Append the following lines to the bashrc file: # LD_LIBRARY_PATH OTCL_LIB=/home/micman/ns-allinone-2.34/otcl-1.13 NS2_LIB=/home/micman/ns-allinone-2.34/lib X11_LIB=/usr/X11R6/lib USR_LOCAL_LIB=/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # TCL_LIBRARY TCL_LIB=/home/micman/ns-allinone-2.34/tcl8.4.18/library USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB # PATH XGRAPH=/home/micman/ns-allinone-2.34/bin:/home/micman/ns-allinone- 2.34/tcl8.4.18/unix:/home/micman/ns-allinone-2.34/tk8.4.18/unix #the above two lines beginning from xgraph and ending with unix should come on the same line NS=/home/micman/ns-allinone-2.34/ns-2.34/ NAM=/home/micman/ns-allinone-2.34/nam-1.14/ PATH=$PATH:$XGRAPH:$NS:$NAM Install NS-2 on ubuntu 5