NS-2 installation under Ubuntu 9.10
System Specification on which ns-2 was installed:
Note: Installation may or may not have some error when installed on a different system.
Steps to follow:
1. Download NS-2 file from the following link:
2. Put the file under /home/karan (i.e. /home/”username”).
3. Open the terminal window and type cd /home/karan
4. To download the auto-configuration files, which is required by NS-2, type the
$ sudo apt-get install build-essential autoconf automake libxmu-dev
5. After the auto-configuration files have been installed type the following
commands to install ns-2:
$ tar zxvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34
6. During the installation you may get the following error “ libotcl.o error “
7. To correct this error type this command:
sudo apt-get install g++-4.3
After executing the above command, open the file otcl-1.13/Makefile.in and in
line number 7 change :-
“CC= @CC@” to “CC= gcc-4.3”
8. After step 7, the error should be fixed, however if you get the same error again
type this command: $ sudo apt-get tcl-8.4-dev , otherwise skip this step.
9. Once the error is fixed, go back to Step 5 and type ./install again.
10. After this NS-2 will ask you to update the Path variables.
11. To update the Path variables, first open the file .bashrc by using this command:
$ gedit /home/karan/.bashrc
12. Now edit the above file by using these commands:
export LD_LIBRARY_PATH= /home/karan/ns-allinone-2.34/otcl-1.13,
13. After these steps NS-2 installation is complete and you can run the validation by
14. Type $ ns in the terminal, you will get a % sign which indicates the installation is
complete and NS- 2 is working. When you type $ nam you will get the network
prepared by Karan Chadha