Sunday, April 13, 2008

Installing NS2.32

I downloaded ns-allinone-2.32 from http://ftp.isi.edu/nsnam/ns/ns-build.html
After storing the .tar file on my Desktop,I ran tar -xvzf ns-allinone-2.32.tar.gz
Which created a folder of the name ns-allinone-2.32 on my desktop.
Then >cd ns-allinone-2.32
>./install
It gave many errors. Firstly I hadn't installed gcc. So I had to install it first. Then there was an x library error related to tcl8.4.15 which was solved by running
>sudo apt-get tcl8.4.15

This is not the end of installation!

In order to set library path I had to edit /.bashrc using
>sudo nano /root/.bashcr
Then I added following lines at the end of bashrc


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:Desktop/ns-allinone-2.32/otcl-1.13:Desktop/ns-allinone-2.32/lib


export PATH=$PATH:Desktop/ns-allinone-2.32/bin:Desktop/ns-allinone-2.32/tcl8.4.15/unix:Desktop/ns-allinone-2.32/tk8.4.15/unix
export TCL_LIBRARY=$TCL_LIBRARY_PATH:Desktop/ns-allinone-2.32/tcl8.4.15/library



I still don't know how exactly this works.

After this
pranav@pranav-laptop:~$ which ns
Desktop/ns-allinone-2.32/bin/ns

This shows that my computer knows where the 'ns' command (executable file) file exists. It exists in the bin folder. If which ns doesn't give any output;you have edited .bashrc wrongly. Do it again till which ns gives some output.

No comments: