Following steps are the guide to install ns2 in windows after the ubuntu (linux) installation.
sudo apt-get install tcl8.5-dev tk8.5-dev
sudo apt-get install build-essential autoconf automake
sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev
https://www.isi.edu/nsnam/ns/ns-build.html
tar -zxvf ns-allinone-2.35.tar.gz -C /home/admin
cd /home/anupamj/ns-allinone-2.35
sudo ./install>
1. You MUST put /home/admin /ns-allinone-2.35/otcl-1.14, /home/admin/ns-allinone-2.35/lib, into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries into LD_LIBRARY_PATH.
If you are using csh, you can set it like: setenv LD_LIBRARY_PATH If you are using sh, you can set it like: export LD_LIBRARY_PATH=
2. You MUST put /home/admin/ns-allinone-2.35/tcl8.5.10/library into your TCL_LIBRARY environmental variable. Otherwise ns/nam will complain during startup.
vi /home/admin/.bashrc
Go to the last line and add the scripts below:
export PATH=$PATH:/home/stan/ns-allinone-2.35/bin:/home/admin/ns-allinone-2.35/tcl8.5.10/unix:/home/admin/ns-allinone-2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/admin/ns-allinone-2.35/otcl-1.14:/home/admin/ns-allinone-2.35/lib
export TCL_LIBRARY=$TCL_LIBRARY:/home/admin/ns-allinone-2.35/tcl8.5.10/library
Enable the path setting:
cd ns-2.35; ./validate