Installing Network Simulator 2 (NS2.34) in Ubuntu 11.04 11

Already this blog posts various titles on installing NS2 in Linux distros. Here is the step for installing in Ubuntu 11.04.

1. Version taken is NS2.34

2. Since ubuntu 11.04 uses GCC-4.5.2, there should be some minor tweeks.

3. Two files should be edited ~ns-2.34/tools/ and ~ns-2.34/mobile/  as given in the following post

4. Install the following things in Ubuntu

sudo apt-get install build-essential autoconf automake libxmu-dev

sudo apt-get install gcc-4.4

5. open the file ~ns-2.34/otcl-1.13/configure and change the line number 6304 to SHLIB_LD=”gcc -shared” instead of SHLIB_LD=”ld -shared”

6. open the file ~ns-2.34/otcl-1.13/ and change the line CC    @CC@ to CC    gcc-4.4

7. Set the path in /home/<name>/ .bashrc as in

8. After setting the path, sometimes overflow error may come when running ns and nam, so open the file ~ns-2.34/tcl8.X.x/unix/ and in line number 270 change @CC@ to @CC@ –V 4.4

Thats it!!! NS2 Installed.

(Thanks to:

About TS Pradeepkumar

I am a professor by profession and a learner by life. Working in VIT University, Chennai, India and love to code and do things in open source technologies. Though from electrical engineering, I am fond of doing things in Computing and its way.

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

11 thoughts on “Installing Network Simulator 2 (NS2.34) in Ubuntu 11.04