LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to install ns2 in ubuntu 11.10 (http://www.linuxquestions.org/questions/linux-networking-3/how-to-install-ns2-in-ubuntu-11-10-a-909150/)

miu 10-20-2011 07:29 AM

how to install ns2 in ubuntu 11.10
 
how to install ns2 in ubuntu 11.10

knudfl 10-20-2011 08:40 AM

Welcome to LQ.

If it has to be Ubuntu, the 32bits Ubuntu 10.04 is recommended.
( Ubuntu 10.04 is a "Long Term Supported" OS. )
Ubuntu 10.10 32bits can also be used, but has a short life.

Ubuntu 11.10 : Not usable.
11.04 : For a few versions of ns2. With a specially made compiler.

All ns2 was created on (and for) CentOS, Scientific Linux (RHEL).

First choice is CentOS 6.0 / Scientific Linux SL 6.1 .

..

miu 10-21-2011 09:36 AM

plz help
 
dear kundlf
thnx for repling... but m getting following error. while installing ns2.34 in ubuntu 11.10

make: gcc-4.3: Command not found
make: *** [libotcl.a] Error 127
otcl-1.13 make failed! Exiting ...

waiting for ur reply plz help..
& i hv also tried cc=gcc-4.3 in makefile.in but still m getting the same error..
lookng forward to u..

jlinkels 10-21-2011 09:46 AM

@miu:
Please spell out your words. SMS talk is something you do on a phone. It is not appreciated on LQ.

Quote:

Originally Posted by knudfl (Post 4503428)
Ubuntu 11.10 : Not usable.

It won't work on 11.10.

For other versions of Ubuntu: use the package manager to install the binary. Don't try to compile the downloaded package. Compilation for Ubuntu has been done by the maintainers, there is not reason to re-invent that process.

Last but not least: if performance on Ubuntu is questionable, you might have to use a different distro. Don't insist on Ubuntu 11.10 if you have been told it won't work.

jlinkels

miu 10-21-2011 10:06 AM

ns2.34 error
 
actually earlier i installed ubuntu 9.04 but due to some problem regarding update manager i was not able to work on that i was getting sh:grub> prompt again & again...as i hv no knowledge of linux someone told me to upgrade it by ubuntu 11.10 & i did that now my ubuntu is working but i am getting error while installing ns2.34 as i told earlier too:
make: gcc-4.3: Command not found
make: *** [libotcl.a] Error 127
otcl-1.13 make failed! Exiting ...


& i tried editing makefile.in also that is cc=gcc-4.3
but that doesnt work for me still i am getting the same error..

plz help

jlinkels 10-21-2011 10:32 AM

It won't work on 11.10.
It=ns2
won't = will not
work=function
11.10=Ubuntu 11.10

Whether knudfl is right about it or not, chances that you are able to compile it yourself are slight.

Use Google and find out on which stable distros/version ns2 will run. Since you know more about Ubuntu than other distros at this moment, you might prefer a different version of Ubuntu. Centos is quite different regarding start-up scripts and package management.

jlinkels

knudfl 10-21-2011 10:44 AM

Ubuntu 9.04 and 9.10 are unsupported and old.

The safe choice is the rock solid Ubuntu 10.04. Read post #2

( 11.10 and 11.04 are experimental versions :
I'd say, that using those is not an upgrade.)


Installing ns2.34 :
cd ns-allinone-2.34/ && export CC=gcc-4.2 CXX=g++-4.2 && ./install

'g++-4.3' may work too. No edits of Makefile's required.


P.S. : Are you still using 11.10 ?
Read post #2 : 11.10 cannot be used for ns2.

..

miu 10-21-2011 10:59 AM

what should i do now
 
yes right now m using ubuntu 11.10 and tried whole day to install ns2.34 on it...but now i know that i was going wrong so can you please suggest me what should i do now???

knudfl 10-21-2011 11:14 AM

Post # 8
Quote:

what should i do now ... yes right now m using ubuntu 11.10
No, you cannot use Ubuntu 11.10 for ns2.
Install the 32bits Ubuntu 10.04.
Either instead of 11.10 , or on a spare partition.


Post # 6 jlinkels :
I guessed that some members would attempt to install ns2.34.
( There always are, on any new version.)
So I did spend 3 days to investigate how badly 11.10 was "improved".
#4 http://www.linuxquestions.org/questi...10-a-909085/#4

.

miu 10-21-2011 11:26 AM

thanks
 
thanks a lot...

miu 10-22-2011 07:49 AM

steps for ns2.34 in ubuntu 10.04
 
hi,
now i have installed ubuntu 10.04 & trying to install ns2 can you please send me the steps...& i tried some steps too but i am getting error:
otcl1.13 making failed....

thanx

knudfl 10-22-2011 08:42 AM

Ubuntu 10.04 :
With the current updates, the default gcc/g++ 4.4.3
may not be usable any more.


Version 4.3 works today : sudo apt-get install g++-4.3

cd ns-allinone-2.34/ && export CC=gcc-4.3 CXX=g++-4.3 && ./install

..

miu 10-22-2011 11:13 AM

no error but still not working
 
hi
i have sucessfully installed ns2.34 in ubuntu 10.04 but still my ns2 is not working
when i am writing ns on the terminal its showing command not found...what should i do now...i am confused...
my installation process:
Please compile your xgraph separately.

Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.18: /home/s/ns-allinone-2.34/{bin,include,lib}
tk8.4.18: /home/s/ns-allinone-2.34/{bin,include,lib}
otcl: /home/s/ns-allinone-2.34/otcl-1.13
tclcl: /home/s/ns-allinone-2.34/tclcl-1.19
ns: /home/s/ns-allinone-2.34/ns-2.34/ns
nam: /home/s/ns-allinone-2.34/nam-1.14/nam
gt-itm: /home/s/ns-allinone-2.34/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

----------------------------------------------------------------------------------

Please put /home/s/ns-allinone-2.34/bin:/home/s/ns-allinone-2.34/tcl8.4.18/unix:/home/s/ns-allinone-2.34/tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/s/ns-allinone-2.34/otcl-1.13, /home/s/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /home/s/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.


After these steps, you can now run the ns validation suite with
cd ns-2.34; ./validate

AND AFTER setting path and running validate command i get:
at Oct 22 11:58:25 EDT 2011
Sat Oct 22 11:58:27 EDT 2011
*** ./test-all-satellite
Tests: repeater mixed wired aloha aloha.collisions mixed.legacy
Running test repeater:
../../ns test-suite-satellite.tcl repeater QUIET
Test output agrees with reference output
Running test mixed:
../../ns test-suite-satellite.tcl mixed QUIET
Test output agrees with reference output
Running test wired:
../../ns test-suite-satellite.tcl wired QUIET
Test output agrees with reference output
Running test aloha:
../../ns test-suite-satellite.tcl aloha QUIET
Test output agrees with reference output
Running test aloha.collisions:
../../ns test-suite-satellite.tcl aloha.collisions QUIET
Test output agrees with reference output
Running test mixed.legacy:
../../ns test-suite-satellite.tcl mixed.legacy QUIET
Test output agrees with reference output
All test output agrees with reference output.
Sat Oct 22 11:58:35 EDT 2011
These messages are NOT errors and can be ignored:
warning: using backward compatibility mode
This test is not implemented in backward compatibility mode


validate overall report: all tests passed
s@ubuntu:~/ns-allinone-2.34/ns-2.34$ s@ubuntu:~/ns-allinone-2.34/ns-2.34$ ns
ns: command not found
s@ubuntu:~/ns-allinone-2.34/ns-2.34$ cd
s@ubuntu:~$ ns
ns: command not found
s@ubuntu:~$

what should i do now ...plz help!!

knudfl 10-22-2011 01:17 PM

Quote:

what should i do now ...
Please do nothing of the adviced "PATH" and/or "LD_LIBRARY_PATH".

This will do : 1) cd ns-allinone-2.34/ns-2.34/ && sudo make install
>>> 'ns' will be copied to a system PATH : /usr/local/bin/ .

2) sudo apt-get install xgraph

3) Use a binary 'nam' : nam-1.14.i586.tar.gz
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US
>>> Unpack, and : sudo cp nam /usr/local/bin/

.

miu 10-22-2011 07:57 PM

again error...
 
hi
It seems as i am almost done but still my nam is not working...i run the follwing commands as told by you & am getting this now:

s@ubuntu:~$ cd ns-allinone-2.34/ns-2.34/ && sudo make install
[sudo] password for s:
Sorry, try again.
[sudo] password for s:
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
s@ubuntu:~/ns-allinone-2.34/ns-2.34$ sudo apt-get install xgraph
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
ygraph
The following NEW packages will be installed:
xgraph
0 upgraded, 1 newly installed, 0 to remove and 73 not upgraded.
Need to get 87.7kB of archives.
After this operation, 262kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/universe xgraph 12.1-12 [87.7kB]
Fetched 87.7kB in 1s (50.8kB/s)
Selecting previously deselected package xgraph.
(Reading database ... 126010 files and directories currently installed.)
Unpacking xgraph (from .../xgraph_12.1-12_i386.deb) ...
Processing triggers for man-db ...
Setting up xgraph (12.1-12) ...
s@ubuntu:~/ns-allinone-2.34/ns-2.34$ tar xvzf nam-1.14.i586.tar.gz
tar: nam-1.14.i586.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors
s@ubuntu:~/ns-allinone-2.34/ns-2.34$ cd
s@ubuntu:~$ cd ns-allinone-2.34
s@ubuntu:~/ns-allinone-2.34$ tar xvzf nam-1.14.i586.tar.gz
nam-1.14.i586/
nam-1.14.i586/nam
s@ubuntu:~/ns-allinone-2.34$ sudo cp nam /usr/local/bin/
cp: cannot stat `nam': No such file or directory
s@ubuntu:~/ns-allinone-2.34$ ns
% exit
s@ubuntu:~/ns-allinone-2.34$ nam
No command 'nam' found, did you mean:
Command 'jam' from package 'bjam' (universe)
Command 'jam' from package 'jam' (universe)
Command 'jam' from package 'ftjam' (universe)
Command 'bam' from package 'bam' (universe)
Command 'njam' from package 'njam' (universe)
Command 'cam' from package 'cam' (universe)
Command 'nm' from package 'binutils' (main)
Command 'nm' from package 'binutils-multiarch' (universe)
Command 'nap' from package 'nap' (universe)
Command 'nasm' from package 'nasm' (main)
nam: command not found
s@ubuntu:~/ns-allinone-2.34$


my ns-allinone-2.34 folder is stored in home folder & i also copied downloaded nam-1.14.i586.tar.gz in this ns-allinone-2.34 after that i unzip it..


All times are GMT -5. The time now is 03:37 PM.