LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-20-2011, 07:29 AM   #1
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Rep: Reputation: Disabled
Question how to install ns2 in ubuntu 11.10


how to install ns2 in ubuntu 11.10
 
Old 10-20-2011, 08:40 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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 .

..

Last edited by knudfl; 10-20-2011 at 08:41 AM.
 
Old 10-21-2011, 09:36 AM   #3
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Unhappy 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..
 
Old 10-21-2011, 09:46 AM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
@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 View Post
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
 
Old 10-21-2011, 10:06 AM   #5
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Question 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
 
Old 10-21-2011, 10:32 AM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
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
 
Old 10-21-2011, 10:44 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.

..
 
Old 10-21-2011, 10:59 AM   #8
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Unhappy 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???
 
Old 10-21-2011, 11:14 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

.
 
Old 10-21-2011, 11:26 AM   #10
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
thanks

thanks a lot...
 
Old 10-22-2011, 07:49 AM   #11
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-22-2011, 08:42 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

..
 
Old 10-22-2011, 11:13 AM   #13
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
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!!
 
Old 10-22-2011, 01:17 PM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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/

.

Last edited by knudfl; 10-22-2011 at 01:21 PM.
 
Old 10-22-2011, 07:57 PM   #15
miu
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
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..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install ns2.27 on Ubuntu 9.10 64-bits version bnkdul Linux - Software 20 03-10-2013 04:14 PM
How to install ns2 2.33 in ubuntu 10.04 andolby Linux - Software 1 03-21-2011 10:48 PM
hi i am trying to install ns2 2.34 in ubuntu 10.04. it showing the following error v123 Linux - Newbie 1 11-10-2010 11:10 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
NS2.34 won't install on ubuntu 9.10 insync Linux - Wireless Networking 1 02-25-2010 02:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration