jump to navigation

Install ns-allinone-2.33 in Ubuntu 10.10 April 13, 2014

Posted by aghus in Linux, NS-2.
trackback

The following steps is my experience in installing ns-allinone-2.33 in Ubuntu 10.10. I installed this ns-version in old ubuntu since I have a class project that ‘insist’ me to use this old version. I need ns-2 and nam. I found a small flaw in nam (network animator) when I did installation. Nam version in ns-allinone-2.33 is nam v1.13. However, I will show two possible solutions for this problem. Lets start it ..🙂

1. Download ns-allinone-2.33.tar and place it in home folder.
2. Extract the file “ns-allinone-2.33.tar” manually by right clicking and by using “extract here” command or by,
$ cd /home/aghus
$ tar -xvf ns-allinone-2.33.tar

3. Download and install other packages like C++ compiler etc. by,
$ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3

4. Edit “makefile.in”
$ cd ns-allinone-2.33/otcl-1.13
$ gedit Makefile.in
Find the line with
CC = @CC@
and Change it to
CC = gcc-4.3

5. Install ns2.33
$ cd ns-allinone-2.33
$ sudo ./install

6. Add path in the .bashrc by putting the following lines in the file and Replace /home/aghus by your particular directory name /home/your name and save the file.

$ gedit ~/.bashrc

# LD_LIBRARY_PATH
OTCL_LIB=/home/aghus/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/aghus/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB
:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/aghus/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/aghus/ns-allinone-2.33/bin:/home/aghus/ns-allinone-2.33/tcl8.4.18/unix:/home/aghus/ns-allinone-2.33/tk8.4.18/unix:/home/aghus/ns-allinone-2.33/xgraph-12.1/
NS=/home/aghus/ns-allinone-2.33/ns-2.33/
NAM=/home/aghus/ns-allinone-2.33/nam-1.13/
export PATH=$PATH:$XGRAPH:$NS:$NAM

7. Validate the ns2.33

$ cd ns-2.33
$ ./validate

8. Create a symlink, so that it can be called from any directory

$ sudo ln -s /home/aghus/ns-allinone-2.33/ns-2.33/ns /usr/bin/ns
$ source ~/.bashrc

9. Run NS2.33
$ ns
10. If installation of ns is succeed, then we can see terminal shows
%
11. You can type exit to get the prompt.

As I told you at the beginning, we will found the error when we use nam directly. Therefore we need to fix the problem. There are two ways :
1. Install patch for the nam, see network-animator-problem-in-ns233.html from rabin (you can googling) ..🙂
2. Install newer nam version, e.g. nam v1.15. After you install the newer nam, change directory name of nam-1.13 with old-nam-1.13. Then you change the directory name of nam-1.15 to nam-1.13. This is a tricky way and it works ..🙂
$sudo apt-get install nam

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: