Installing ns-2.34 on Ubuntu 10.10
To keep up the pace with new versions of Ubuntu and potentially new installation problems with ns-2, here is a recipe for installing ns-2.34 on Ubuntu 10.10:
Download and extract ns-2.34 to a folder in your home directory. Get ns-2.34 allinone here.
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
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"
And run ./install
Good luck!
See also: Installing ns-2.34 on Ubuntu 11.10 Oneiric Ocelot
Advertisement
hi
i m trying to install ns2.34 on ubuntu10.10.
sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3
downloaded ns2.34
extract
cd /home/abcd/ns-allinone-2.34
dited the make.in file of otcl
CC= @CC@
and change it to:
CC= gcc-4.3
but when i put install command
it give following error
make:warning:file ‘home/abcd/ns-allinone2.34/tcl8.4.18/unix/makefile.in’ has modification time 2e+08s in the future
plz help me
bhawna
Friday, March 11, 2011 at 8:15
Hi Bhawna,
I’m not sure how you managed to get this error. You can change the modification time of makefile.in using the command ‘touch’ as follows:
touch -m -t 201103111030 makefile.inwhere the number after the -t is a timestamp in the form CCYYMMDDHHMM.
By the way, I didn’t get your change of the makefile.in file of otcl to work for me, so I recommend my fix in the post above.
Cheers!
Erlend
Friday, March 11, 2011 at 10:31
hi
Thank you for ur suggestion ,i tried it
but again it gives the error
make:warning:file ‘home/abcd/ns-allinone2.34/tcl8.4.18/unix/makefile.in’ has modification time 1.5e+04s in the future
So plz tell me what i can do now
bhawna
Saturday, March 12, 2011 at 6:32
Hello, I would like to ask, how do I run ns in ubuntu 10.10.
I had installed it following your instructions. Then I tried to run an example tcl file by going to the tcl file directory and running “ns test.tcl” on terminal. But I get “The program ‘ns’ is currently not installed. You can install it by typing:
sudo apt-get install ns2″
I understand that this will start a completely new installation of ns 2, different from the installation already done supposedly.
How do I resolve this?
I’m sorry if its a silly question, I’m very new to linux environment and already tried googling to no avail. I hope you could shed some light.
THANKS!!!
Partohap
Sunday, March 20, 2011 at 5:46
I guess you could make ns available from any directory by doing a ‘make install’ after installing/compiling ns-2.
However, I would advise you to instead use the full path when you want to run the simulator. This way you can have several ns-2 versions on your computer, maybe with different alterations to specific code segments, and know which version that you are using to run the simulations with.
If you for instance have a version of ns-2 in the directory /home/user/simulators/ns-allinone-2.34/.. you would from your simulation script directory write ‘/home/user/simulators/ns-allinone-2.34/ns-2.34/ns test.tcl’
Or you could use the relative path from the tcl file directory to get up to where the ns executable lies and run the simulation script with ‘../ns test.tcl’
Finally, if you are in the directory where the ns executable is residing, you have to put ‘./’ in front of the filename to execute the file. Thus, you have to write ‘./ns test.tcl’ to run the script.
Good luck!
Erlend
Sunday, March 20, 2011 at 23:06
Hi Erlend,
I have smoothly installed the ns, but when I run, it didn’t work.
ns: command not found
How do I resolve this?
thanks in advance
congeyok
Monday, March 21, 2011 at 5:03
Check my answer to Partohap above.
Erlend
Thursday, March 24, 2011 at 9:00
Thank you thank you thank you! Iḿ a first timer, and you saved me!
Mervat
Thursday, March 24, 2011 at 7:34
Glad to help!
Erlend
Thursday, March 24, 2011 at 9:00
hi for me the installation was success but i couldn,t compile it it shows error ,how can i sort out this help me
% ns t.tcl
warning: using backward compatibility mode
error when calling class OldSim: t.tcl
jayanth
Sunday, April 10, 2011 at 18:27
[...] 参考来源:Installing ns-2.34 on Ubuntu 10.10 [...]
Ubuntu下安装ns-allinone-2.34记录 | Laycher's Blog
Saturday, April 16, 2011 at 3:36
I followed ur installation steps.
Tcl ,Otcl ,Tk builds are successful
but during the ns 2.34 build it gives an error n terminates abruptly…
gcc Killed…
Plz help ASAP…thanks..
Abhay
Sunday, April 17, 2011 at 11:29
[...] do the same things as you would do for the ns-2.34 and Ubuntu 10.10 installation, [...]
Installing ns-2.34 on Ubuntu 11.04 « Erlend's Lookout Post
Thursday, May 12, 2011 at 8:47
hi when i execute make makefile.in
the following error appears:
******
administrateur@ubuntu:~/ns-allinone-2.34/ns-2.34$ make makefilemake: *** No rule to make target `makefile’. Stop.
********
Please help
THANKS IN ADVANCE
fatma
Friday, May 13, 2011 at 22:21
Hi Erland,
I try to install NS2 on my Natty Narwhal (11.04) but there are any problem. that’s:
gcc -V 4.5.2 -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/madness/ns-allinone-2.34/include -I/home/madness/ns-allinone-2.34/include -I/home/madness/ns-allinone-2.34/include -I/include otcl.c
gcc: error trying to exec ‘x86_64-linux-gnu-gcc-4.5.2′: execvp: File o directory non esistente
gcc -shared -o libotcl.so otcl.o
gcc: otcl.o: File o directory non esistente
gcc: no input files
make: *** [libotcl.so] Errore 1
otcl-1.13 make failed! Exiting …
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Can you help me?
thank you vary much!
(from italy –> i’m sorry for my english)
Madness
Wednesday, May 25, 2011 at 14:50
I tried to do :http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/
but without good results
I Hope you con help me
Madness
Wednesday, May 25, 2011 at 15:01
Hi,
I don’t understand why you have a make command where you force the gcc compiler to use version 4.5.2, as the first line in your error message states: “gcc -V 4.5.2 -c…”. But I have no experience with the 64 bit OS. Perhaps it would work better using a 32 bit OS?
Cheers,
Erlend
Erlend
Thursday, May 26, 2011 at 9:07
Hi Erland,
these are the last lines after invoking the command “. / install” to install NS2.
I’m not forced to use gcc 4.5.2. So you think it is a problem due to the 64bit OS?
I downloaded the package gcc4.3.3 but it seems difficult to install (I’m new in linux). As far as I understand, I think he can not see the gcc compiler during installation. This problem arises when it is installing “OTcl.
I always hope in you
thanks for attention
Madness
Thursday, May 26, 2011 at 9:53
I’m just looking to see what factors are different for you compared to me, and the 64 bit OS is one difference. I’m not able to recreate your error, but installing gcc 4.4 should be easy using the Synaptics Packet Manager.
If this is very important for you, I would reinstall Ubuntu 11.04 and download a clean version of ns-allinone-2.34 and follow the directions in the post http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/ to the letter.
Cheers
Erlend
Thursday, May 26, 2011 at 10:45
You can run Synaptic Package Manager either through the Applications button (the magnifying glass with a + inside), or run it from the command line:
$ sudo synapticI’ll add this to the blog post also.
Erlend
Thursday, May 26, 2011 at 11:39
First, thanks for your patience.
NS2 I need for college and, unfortunately, even in a short time.
I followed exactly your guide for ubuntu 11.04.
What you call “Synaptic Packet Manager” would be “Ubuntu software center” in 11:04?
From there I installed gcc and automatically installed the version 4.5.2!
How can I now install the 4.4?
grrrrrrr that anger! but could not be easier to install software in linux!?
many thanks
P.S.
if we can not solve the problem, I might consider installing a new version of linux in another HD (external), right?
Madness
Thursday, May 26, 2011 at 11:08
I found Synaptic!
)
Now, I install the 4.4 version and let you know what happens!
Slowly, I learn!
Madness
Thursday, May 26, 2011 at 11:39
Hi can you tell me how to install um-olsr in ns2 2.34 ,I’m using ubuntu 10.10
umairahmedshah
Sunday, June 19, 2011 at 9:01
I think it will go smoothly if you follow the installation instructions at the um-olsr webpage and patch with the um-olsr patch for ns-2.34 here: http://masimum.dif.um.es/?Software:UM-OLSR:Patches
Cheers
Erlend
Tuesday, June 21, 2011 at 7:47
warning: using backward compatibility mode
error when calling class OldSim
Chiru Jeevi
Monday, July 4, 2011 at 10:32
plz can u hel me for this…………. i have so much problem with this………..
warning: using backward compatibility mode
error when calling class OldSim
Chiru Jeevi
Monday, July 4, 2011 at 10:33
please help me , getting problem while installing ,i log off, log in
executeed sudo apt-get update
it asked password i gave
the media change:please insert the disc labeled
‘ Ubuntu 10.10 _Maverick Meerkat_-Release i386(20101007)’
in the drive ‘/cdrom/’ and press enter
i got this, so i inserted ubuntu 10.10 i press enter ,but still getting same problem
Your comment is awaiting moderation.
r
Tuesday, July 12, 2011 at 11:47
I have the same problem..so plz help
junaid
Thursday, September 22, 2011 at 11:54
You can edit the repositories that apt uses, either through editing the file /etc/apt/sources.list directly, or through the Synaptic Package Manager. You need to disable the use of the CD as repository, provided you are connected to the Internet.
Erlend
Friday, September 23, 2011 at 9:01
i am now currently using ubuntu 11.04 could you please tell me how to run ns 2.34 and how can i work the thing in my system.anyone please help me… and thank you in advance.
Sabeer
Monday, September 19, 2011 at 11:46
http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/
Erlend
Monday, September 19, 2011 at 12:16
I am now currenty using ubuntu 10.10
and when i typed
# sudo source ~/.bashrc
the respond is :
sudo: source: command not found
what should i do ??
thanks
tonz
Thursday, October 27, 2011 at 21:59
I have received a scheme for pacing packets and its called queue length based pacing (QLBP) from its author.
He provided the documentation to patc that scheme in ns-allnone-2.33.
that is :
—————————————————————————-
Apply QLBP patch
Step 1. Copy ns2-patch/queue/qlbp.cc and qlbp.h to ns-homefolder/ns-2.33/queue, where ns-homefolder is where the ns-allinone-2.33 package is installed.
Step 2. Copy lines 109 to 118 of ns2-patch/tcl/lib/ns-default.tcl into ns-homefolder/ns-2.33/tcl/lib/ns-default.tcl. The copied content can be inserted at line 109 of ns-homefolder/ns-2.33/ tcl/lib/ns-default.tcl. Note that don’t replace your ns-default.tcl with the provided ns-default.tcl. Doing so will cause a failure of running ns2 in your linux machine.
That is :
# added by Yan Cai
Queue/QLBP set drop_front_ false
Queue/QLBP set summarystats_ false
Queue/QLBP set queue_in_bytes_ false
Queue/QLBP set mean_pktsize_ 500
Queue/QLBP set qmax_ 20
Queue/QLBP set umax_ 100Mb
Queue/QLBP set umin_ 100Kb
Queue/QLBP set amplfer_ 1.0
Queue/QLBP set linespeed_ 100Mb
Step 3. Copy line 326 of ns2-patch/Makefile to line 326 of ns-homefolder/ns-2.33/Makefile.
That is : queue/qlbp.o \
Step 4. Go to ns-homefolder/ns-2.33/ and run “make” to recompile ns2.33
————————————————————————-
after going through the procedure I am getting following error :
———————————————————————–
invalid command name “Queue/QLBP”
while executing
“Queue/QLBP create _o645 ”
invoked from within
“catch “$className create $o $args” msg”
invoked from within
“if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return “”
}
global errorInfo
error “class $…”
(procedure “new” line 3)
invoked from within
“new Queue/$qtype”
(“default” arm line 3)
invoked from within
“switch -exact $qtype {
ErrorModule {
if { [llength $args] > 0 } {
set q [eval new $qtype $args]
} else {
set q [new $qtype Fid]
}
}
intserv {
set qtyp…”
(procedure “_o3″ line 14)
(Simulator simplex-link line 14)
invoked from within
“_o3 simplex-link _o141 _o153 100Mb 20ms QLBP”
(“eval” body line 1)
invoked from within
“eval $self simplex-link $n1 $n2 $bw $delay $type $args”
(procedure “_o3″ line 8)
(Simulator duplex-link line 8)
invoked from within
“$ns duplex-link $acr($i) $cr(0) $stage2_bw $stage2_delay QLBP”
(procedure “create_topology” line 54)
invoked from within
“create_topology”
(file “bell_topology.tcl” line 528)
————————————————————————
I think there is just a little error in patching the QLBP scheme..
PLEASE HELP ME AS SOON AS POSSIBLE…
mhk
Friday, November 4, 2011 at 13:22
i have a problem when i install ns2.33 in ubuntu10.10
/home/pranesh/ns-allinone-2.33/tk8.4.18/unix/../generic/tk.h:81: fatal error: X11/Xlib.h: No such file or directory
make: *** [tk3d.o] Error 1
tk8.4.18 make failed!
Pranesh Paul
Wednesday, December 21, 2011 at 8:14
Have you performed this operation successfully?: sudo apt-get install xorg-dev g++ xgraph
Erlend
Wednesday, December 21, 2011 at 8:23
i did this. bt they show that xgraph can nt find anythng
Pranesh Paul
Wednesday, December 21, 2011 at 15:09
HI!!
Thank you so much for putting up this content!
With much help from here and there I finally got NS2.34 installed on Ubuntu 11.04!!!!!!!
Ashish
Tuesday, January 10, 2012 at 19:42