Installing ns-2.35 in Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04
Tutorial to install ns-2.35 on Ubuntu 12.04/10 and 13.04/10
please follow the tutorial step by stepStep 1:
Download NS-2.35 (http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download)
Step 2:
place this file ns-allinone-2.35.tar.gz in any folder you like (recommended is /home/loginname)
Step 3:
Run this command in terminal
( first go to the directory where you have put you ns-allinone-2.35.tar.gz file. )
tar zxvf ns-allinone-2.35.tar.gz (extracts the .tar.gz files content to a folder in the same directory name ns-allinone-2.35)
Step 4:
Run these command in terminal (Requires Internet)
sudo apt-get update ( means you need to keep your pc sources updated )
sudo apt-get install build-essential autoconf automake libxmu-dev (These are essential library files and size is around 17 MB)
Step 5:
Run this command in terminal
cd ns-allinone-2.35 (get inside the ns directory)
Step 6:
./install
note:- the only error I got was something related to linkstate/ls.h.
So to resolve this issue do the following
execute command
sudo gedit ns-allinone-2.35/ns-2.35/linkstate/ls.h
on line number 137 change
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
to
void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
Save and Close it.
Now again run ./install
after successful compilation you get ld_library_path an path ... read carefully !!!
Step 7:
This step is about how to save paths properly.
You will receive a three set of paths after successful completion of install command.
these are path, ld library path and tcl library.
So to save them properly do the following:-
run cd .. ( this brings you back in home directory)
run gedit .bashrc (at last of the file add these paths in format given below)
export PATH=$PATH:path1:path2:path3 (Here paths should be separated by colon)
similarly for
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path1:path2 (paths separated by colon)
and also for
export TCL_LIBRARY=$TCL_LIBRARY:path
Save and close it.
run source .bashrc (this loads the new .bashrc file)
Type nam
if you see nam window then great, installed successfully.
or else
post the error (note most of the mistakes happen in the last step i.e. saving paths).
Comments
similarly for
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path1:path2:path3( means paths should be separated by colon)
save and exit,
where i do all this things
its the part of step 7 ... read again...
whenever we install a new software in ubuntu through cmd line ... and our new software contains some custom commands like ns or nam ... then we need to add them to .bashrc file so that our cmd prompt can recognize that custom command by taking the paths we give....
and after successful completing of step 6 ... u will receive some paths ... those are the paths and are in order like path 1 path 2 etc....
hope you would use a little of your head this time...
bash: export: `/home/salma/ns-allinone-2.35/lib': not a valid identifier
bash: fg: no job control
? is my path correct ?
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: /home/salma/ns-allinone-2.35/otcl-1.14:/home/salma/ns-allinone-2.35/lib
%export TCL-LIRARY=/home/salma/ns-allinone-2.35/tcl8.4.11/library
and gcc is by default installed in ubuntu 12.10
1. remove space before colon (like ....LD_LIBRARY_PATH:/home/salma/...)
source .bashrc
and type ns (% symbol means success)
exit
I tried installing ns2.34 & ns2.35 on ubuntu 12.10 without internet.
Is it possible to install without internet?
If yes then how?
If not then why it cant be installed without internet connection.
Thanks in advance
and yes you can install ns2 without internet but you need to download the libraries which are present in your second command i.e.
sudo apt-get install build-essential autoconf automake libxmu-dev
but you need to install it manually...
these four libraries can be found also through synaptics package manager
hope this helps ....
I mistyped 12.10 instead of 12.04!
I dont have permission in my college to download anything!
I have ubuntu 12.04 in college!
If i have to install ns-2.35 on ubuntu 12.04 without internet facility!
What should I do for doing the same!
What should I download at home apart from ns all in one package!
Thanks!
but you can search for all the four libraries above and procedure to install them..
yes you can do but you need to work a little.
hope I can do it quickly!
My friend told me about this blog!
He was right in praising you!
Also do you have any idea about how to make few nodes as black hole in tcl script?
Also how to identify them & remove them !
Thank you very much !
Cheers buddy!!
./setdest -v 1 -n 50 -p 0 -M 20 -t 900 -x 1500 -y 300 > out.txt
but there is an error occured
bash: ./setdest: no file or directry
i have ns2.35 simulator and setdest folder and make file are included in it plzz tell me the set by set procedure for running this command i will be v thankful to u
E: Package 'autoconf' has no installation candidate
E: Package 'automake' has no installation candidate
E: Package 'libxmu-dev' has no installation candidate
please, is there some solutions??
Then you can edit your library paths from there. As for me i just downloaded it and save it in my home folder and my installation went on well.
ELSE THANKS TO THE POST UPLOADER. MAKEKE (cakes)
./install
bash. / : Permission denied.
please help me how to solve this
export PATH=$PATH:/home/vikas/Documents/ns-allinone2.35/bin:/home/vikas/Documents/ns-allinone2.35/tcl8.5.10/unix:/home/vikas/Documents/ns-allinone2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/vikas/Documents/ns-allinone2.35/otcl-1.14/home/vikas/Documents/ns-allinone2.35/lib
export TCL_LIBRARY=$TCL_LIBRARY:/home/vikas/Documents/ns-allinone2.35/tcl8.5.10/library
when I type nam it give me an error Segmentation fault (core dumped)
appreciate your work!
dell@dell-Inspiron-3521:~/Desktop$ cd ..
dell@dell-Inspiron-3521:~$ gedit .bashrc
dell@dell-Inspiron-3521:~$ source .bashrc
bash: /home/dell/Public/ns-allinone-2.35/otcl-1.14/home/dell/Public/ns-allinone-2.35/lib: No such file or directory
bash: /home/dell/Public/ns-allinone-2.35/tcl8.5.10/library: No such file or directory
bash: export: `/home/dell/Desktop/ns-allinone-2.35/lib,': not a valid identifier
dell@dell-Inspiron-3521:~$ cd Desktop/
dell@dell-Inspiron-3521:~/Desktop$ source .bashrc
bash: .bashrc: No such file or directory
dell@dell-Inspiron-3521:~/Desktop$ cd ..
dell@dell-Inspiron-3521:~$ source .bashrc
bash: /home/dell/Public/ns-allinone-2.35/otcl-1.14/home/dell/Public/ns-allinone-2.35/lib: No such file or directory
bash: /home/dell/Public/ns-allinone-2.35/tcl8.5.10/library: No such file or directory
bash: export: `/home/dell/Desktop/ns-allinone-2.35/lib,': not a valid identifier
dell@dell-Inspiron-3521:~$ ns
% exit
dell@dell-Inspiron-3521:~$ nam
Segmentation fault (core dumped)