Installing ns-2.34 in Ubuntu 10.04

Download ns-allinone-2.34 and Install
Cut the downloaded file from the Downloads folder and paste it to your desired folder for installation
$ tar -xzvf ns-allinone-2.32.tar.gz
$ cd ns-allinone-2.32
(before install ns-2 you will need the packages that are shown below )
sudo apt-get install build-essential autoconf automake libxmu-dev
$ sudo apt-get install libx11-dev libxmu-dev libxmu-headers libxt-dev libtool
$ sudo apt-get install dpkg-dev g++
 libc6-dev make
$ sudo apt-get install tcl8.4 tk8.4
$ sudo apt-get install build-essential 
These packages might be dependent on each other so I remember installing the packages in reverse order.

Install the development files for X Windows plus the g++ compiler:
sudo apt-get install xorg-dev g++ xgraph
Fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure so that it reads
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"

sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3 
instead of the previous command would require to change the Makefile.in
Since my version was compatible no need to change it.

Change ns-allinone-2.34/otcl-1.13/Makefile.in. Find the line that says:
CC=    @CC@
and change it to
CC=    gcc-4.3
  

Now run this command
Come back to ns-allinone-2.34 folder.
$./install

after install ns-2 you should introduce ns-2 to your computer and edit the bash file
$ gedit ~/.bashrc
Now add these lines at the end. Change the path accordingly.

PATH=$PATH:/home/wifidit/ns-allinone-2.34/bin:/home/wifidit/ns-allinone 2.34/tcl8.4.18/unix:/home/wifidit/ns-allinone-2.34/tk8.4.18/unix

LD_LIBRARY_PATH=/home/wifidit/ns-allinone-2.34/otcl-1.13:/wifidit/ns-allinone-2.34/lib

TCL_LIBRARY=/home/wifidit/ns-allinone-2.34/tcl8.4.18/library


In place of wifidit, use your system username.. 

1 comment: