Thursday 18 July 2013


How to Install NS All In One 2.35 in Ubuntu 12.04

As Ubuntus new version 12.04 LTS needs following packages before any further installation,otherwise it will not work with it. Please follow the following steps:

1. Download & install some packages from repository if needed (Now its optional)

$ sudo apt-get update

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

2. Download NS All In One 2.35

URL: http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download

$ tar -zxvf ns-allinone-2.35.tar.gz

$ cd ns-allinone-2.35

$ ./install

3. Set environment variables

$ gedit ~/.bashrc

Add the following lines to the end of the file.
 

I run ns-2.35 on my Ubuntu 12.10
While I finished installing my ns2 and tried to run via "sudo ns xxx.tcl", it showed on the screen saying that there was no ns2 on my computer and I have to use "apt-get install ns2". I used it, and then it was installed successfully.
Now I modify some .cc files and recompile my ns2, and it is successful, too.
But the problem is that the results are not modified as I want. In fact, the result doesn't change. It seems my modification doesn't really change anything in my ns2. Why? There's no error in my installation or compilation? I am so confused. Is there anyone face the same problem? Thanks in advance!

down vote accepted
I think your installed ns2 is not in your bash_profile path. execute which ns in terminal. it displays which ns is currently working. If it is usr/bin its default ns .now give path to your ns using PATH command. hope it helps




Yes, it's usr/bin/ns. Thanks so much for this. But for modifying the path, I have modified the path setting in .bashrc file, and the path was not set to default path. Do I need to change it? – DartKouth Jul 5 at 3:50

Go to your NS2allinone/bin directory Type "pwd" it displays (echo) the path to present bin folder.now copy this and open new terminal and type .bash_profile just add this path with existing path. or PATH="your pwd echo message" now tou can execute your ns.. but you need to do this for every terminal. – Naveen.S Jul 6 at 6:03

Thank you so much. This really helps!

No comments:

Post a Comment