Ns2.34 Installation insturction on Ubuntu 10.04
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
$ 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
$ 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
instead of
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 I did not 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
$./install
after
install ns-2 you should introduce ns-2 to
your computer and edit the bash file
$ gedit ~/.bashrc
$ gedit ~/.bashrc
I added
these lines at the end. Change the path accordingly.
#LD_LIBRARY_PATH
OTCL_LIB=/home/pushpita/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/pushpita/ns-allinone-2.34/lib
USR_LOCAL_LIB=/usr/local/lib
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$otc
#TCL_LIBRARY
TCL_LIB=/home/pushpita/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/pushpita/ns-allinone-2.34/bin:/home/pushpita/ns-allinone-2.34/tcl8.4.18/unix:/home/pushpita/ns-allinone-2.34/tk8.4.18/unix
NS=/home/pushpita/ns-allinone-2.34/ns-2.34/
NAM=/home/pushpita/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
OTCL_LIB=/home/pushpita/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/pushpita/ns-allinone-2.34/lib
USR_LOCAL_LIB=/usr/local/lib
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$otc
#TCL_LIBRARY
TCL_LIB=/home/pushpita/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/pushpita/ns-allinone-2.34/bin:/home/pushpita/ns-allinone-2.34/tcl8.4.18/unix:/home/pushpita/ns-allinone-2.34/tk8.4.18/unix
NS=/home/pushpita/ns-allinone-2.34/ns-2.34/
NAM=/home/pushpita/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
$
source ~/.bashrc
you should write command at the above, otherwise you cant write ns2 succesfully
Now, open new console and write ns, you will see % at the console.
be carefull!!! you can see % after write ns at any path...by the way to exit from % you
should write “exit” on your console.
you should write command at the above, otherwise you cant write ns2 succesfully
Now, open new console and write ns, you will see % at the console.
be carefull!!! you can see % after write ns at any path...by the way to exit from % you
should write “exit” on your console.
Validation
After these steps, you can now run the ns
validation suite with
$ cd ns-2.34 $ ./validate
after this process you can run som
Hello sir,
ReplyDeleteI have followed all the above steps to install ns2.34. Codes executed but NAM is not there.
Please tell me how can I install NAM separately.
Thanks in advance