Installing ns-2.34 on Ubuntu 11.10 Oneiric Ocelot
This is almost identical to the way ns-2.34 is installed on Ubuntu 11.04, except for the lines in bold face:
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"
Then, edit the file ns-2.34/tools/ranvar.cc and change the line 219 from
return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
to
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
Next, change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc to read
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();
Add a line after line 64 in ns-2.34/mac/mac-802_11Ext.h to read:
#include <stddef.h>
Now the code will compile if you run ./install. However, you may not be able to run the ns executable. If you get an error stating that there has been a buffer overflow *** buffer overflow detected ***: ./ns terminated including a backtrace, you need to do the following to make it work:
Install gcc-4.4 and g++-4.4 including dependencies using the code below:
$ sudo apt-get install gcc-4.4 g++-4.4
Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it uses gcc version 4.4:
CC = gcc-4.4
Finally, run ./install from the ns-allinone-2.34 top folder again.
P.S. If you are moving and renaming ns-2 folders as time goes by, check the tip here on a potential problem with tk.
[...] Installing ns-2.34 on Ubuntu 11.10 Oneiric Ocelot « Erlend's Lookout Post [...]
Installing ns-2.34 on Ubuntu 11.04 « Erlend's Lookout Post
Friday, October 14, 2011 at 13:50
[...] also: Installing ns-2.34 on Ubuntu 11.10 Oneiric Ocelot LD_AddCustomAttr("AdOpt", "1"); LD_AddCustomAttr("Origin", "other"); [...]
Installing ns-2.34 on Ubuntu 10.10 « Erlend's Lookout Post
Friday, October 14, 2011 at 13:52
thanks you saved me
Mehran
Tuesday, October 18, 2011 at 18:00
how to install ns 2.34 on ubuntu 11.10.. please explain to me in detail
budi
Friday, October 21, 2011 at 16:46
thanks a lot
i would like to ask permission to translate this post into Chinese and i will keep the origin URL
yish
Friday, October 28, 2011 at 3:53
Permission granted!
Erlend
Friday, October 28, 2011 at 7:30
Thanks you so much………………
duyanhvt1
Monday, October 31, 2011 at 14:14
[...] 主要参考的是,http://erl1.wordpress.com/2011/10/14/installing-ns-2-34-on-ubuntu-11-10-oneiric-ocelot/ 我有一些补充。 [...]
在ubuntu11.10上编译安装NS-allinone-2.34
Tuesday, November 1, 2011 at 7:05
Good morning,
I try to transform ns-2.34 to multi interface multi channel with routing protocol TORA but It don’t work. I use same things as in AOMDV in ns2.33 in this @:http://mohittahiliani.blogspot.com/2011/07/modified-aomdv-with-multiple-interface.html
pls can you help me.
lamia
Friday, November 4, 2011 at 3:33
A long time ago, I implemented multiple interfaces for use with OLSR using the recipe by Ramón Calvo http://personales.unican.es/aguerocr/
Erlend
Friday, November 4, 2011 at 9:49
hey.. very nice description..but when i followed all these steps i am getting the following error.
Warning: tclStubInit.c may be out of date.
Developers may want to run “make genstubs” to regenerate.
This warning can be safely ignored, do not report as a bug!
Installing libtcl8.4.a to /home/ranjita/ns-allinone-2.34/lib/
cp: cannot create regular file `/home/ranjita/ns-allinone-2.34/lib/#inst.10843#’: Permission denied
rm: cannot remove `/home/ranjita/ns-allinone-2.34/lib/libtcl8.4.a’: Permission denied
mv: cannot stat `/home/ranjita/ns-allinone-2.34/lib/#inst.10843#’: No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.4.18 installation failed.
Tcl is not part of the ns project.
Please help me out.. need to install it urgently..
Ritu
Thursday, November 10, 2011 at 18:12
Perhaps you have a file and directory permissions problem?
Erlend
Thursday, November 10, 2011 at 18:17
Hi sir, How i solve this error…………….
I have installed ns2(ns-allinone-2.34) in ubuntu11.10 .. At time of
execution it’s showing some error like u installed tcl8.5 package th
need is exactly tc18.4 only like that.
Error is
: version conflict for package “Tcl”: have 8.5.10, need exactly 8.4
while executing
“package require -exact Tcl 8.4″
child process exited abnormally
i cannn’t execute nam animatorr sir while i try to execute this error is come plz help ……
mohandass
Saturday, November 26, 2011 at 1:59
how i solve this error
I have installed ns2(ns-allinone-2.34) in ubuntu11.10 .. At time of
execution it’s showing some error like u installed tcl8.5 package th
need is exactly tc18.4 only like that.
Error is
: version conflict for package “Tcl”: have 8.5.10, need exactly 8.4
while executing
“package require -exact Tcl 8.4″
child process exited abnormally
mohandass
Saturday, November 26, 2011 at 2:02
I have the same problem, if you fixed this problem,
pleace, tell me how.
clecio
Friday, December 2, 2011 at 18:21
have you installed ns2 using the command “sudo spt-get install ns2 nam xgraph “? IF it…first uninstall ns2.34 and “nam”(important) from the system …install ns2.35 from sourceforge
Ayappan
Friday, January 27, 2012 at 7:56
Hi, when I run the code i faced following error. pls help me..
make: Warning: File `Makefile.in’ has modification time 1.9e+07 s in the future
Makefile.in is newer than Makefile.
You need to re-run configure.
false
make: *** [Makefile] Error 1
Ns make failed!
arasu
Monday, January 23, 2012 at 19:22
Have you tried executing
./configurefrom the
ns-allinone-2.34/ns-2.34folder, or any other folder where you have a Makefile?
Erlend
Tuesday, January 24, 2012 at 8:09
Yes, I have tried, I faced the same error..
kindly help me
arasu
Tuesday, January 24, 2012 at 13:59
Hi i faced following error. kindly guide me…
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/sesho/ns-allinone-2.34/include -I/home/sesho/ns-allinone-2.34/include -I/home/sesho/ns-allinone-2.34/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch’:
/home/sesho/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local’
otcl.o: In function `Otcl_Init’:
/home/sesho/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local’
ld: libotcl.so: hidden symbol `__stack_chk_fail_local’ isn’t defined
ld: final link failed: Bad value
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting …
arasu
Monday, January 30, 2012 at 17:29
I have the same problem, if you fixed this problem, pleace, tell me how.
sana
Saturday, February 11, 2012 at 13:37
re,
I forgot to do these first instructions:
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”
Once I did I could fix this problem.
sana
Saturday, February 11, 2012 at 15:11
I have installed Ns-2.34 on Ubuntu 11.10, but when I tried to run
$ ns example1a.tcl
i got
nam:
: version conflict for package “Tcl”: have 8.5.10, need exactly 8.4
while executing
“package require -exact Tcl 8.4″
Can you please help me to solve this problem
gowtham
Wednesday, February 8, 2012 at 10:00