LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2010, 09:47 AM   #1
bgprasuna
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Rep: Reputation: 0
running prablems of ns2 in linux


i'm prasuna
i installed ns2.34 in laptop successfully.when i run any probgram it shows the following errors.please help me.tell me d reason of that error.
% ns MAgent.tcl
error when calling class OldSim: MAgent.tcl
%

[root@localhost ~]# ns
% ns sample.tcl
warning: using backward compatibility mode
error when calling class OldSim: sample.tcl
%
 
Old 07-24-2010, 11:03 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
[root@localhost ~]# ns
You don't need to be root to run ns. And it is unsafe.
Please do all ns commands as unprivileged user.
'root' is for administrative tasks only.

% ns file.tcl : Will not work.

The command is simply : ns file.tcl
.....

Last edited by knudfl; 07-24-2010 at 11:05 AM.
 
0 members found this post helpful.
Old 07-25-2010, 04:55 AM   #3
bgprasuna
LQ Newbie
 
Registered: Jul 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
You don't need to be root to run ns. And it is unsafe.
Please do all ns commands as unprivileged user.
'root' is for administrative tasks only.

% ns file.tcl : Will not work.

The command is simply : ns file.tcl
.....
i tried sir but its not working.dont mine sir i'm very beginer to this sir i dont know the abc of it.I tried as you said
[root@localhost ~]# ns MAgent.tcl
couldn't read file "MAgent.tcl": no such file or directory
[root@localhost ~]# ns simple.tcl
couldn't read file "simple.tcl": no such file or directory

i also tried by going into the ns2.34

[root@localhost ~]# cd /home/karthik
[root@localhost karthik]# cd ns-allinone-2.34
[root@localhost ns-allinone-2.34]# cd ns-2.34
[root@localhost ns-2.34]# ns simple.tcl
couldn't read file "simple.tcl": no such file or directory
[root@localhost ns-2.34]# cd /home/karthik
[root@localhost karthik]# ns simple.tcl
couldn't read file "simple.tcl": no such file or directory
[root@localhost karthik]# ns simple.tcl
couldn't read file "simple.tcl": no such file or directory
[root@localhost karthik]#
 
Old 07-25-2010, 05:31 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Running ns2 files as root : You may have to delete all ns2,
and reinstall from scratch. And please do not use root (su).


Using a command, and pointing to a file :
The first command is 'pwd' , which will show your location.

So next you must either : cd <to-location-with-file.tcl>
Example : cd ns-allinone-2.34/ns2.34/tcl/ex/ && ns simple.tcl

Or use the full path :
ns ns-allinone-2.34/ns2.34/tcl/ex/simple.tcl

And if you have the MAgent.tcl on your Desktop :
cd Desktop && ns MAgent.tcl
..
 
Old 12-21-2010, 10:33 AM   #5
goodGOD
LQ Newbie
 
Registered: Dec 2010
Posts: 14

Rep: Reputation: 0
Dear knudfl and all,

I have validate ns 2.34 and it is fine. the PC is Fedora 13
Seems to have done everything .

but i have these errors and NS is not working ........PLEASE HELP!!
1
[johna@MQMKlocalhost ex]$ simple.tcl
bash: simple.tcl: command not found
[johna@MQMKlocalhost ex]$ ns simple.tcl
bash: ns: command not found
[johna@MQMKlocalhost ex]$

below is my .bashrc

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# LD_LIBRARY_PATH
OTCL_LIB=/home/johna/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/johna/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/johna/ns-allinone-2.34/tcl8.4.15/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/johna/ns-allinone-2.34/bin:/home/johna/ns-allinone-2.34/tcl8.4.15/unix:/home/johna/ns-allinone-2.34/tk8.4.14/unix
NS=/home/johna/ns-allinone-2.34/ns-2.32/
NAM=/home/johna/ns-allinone-2.34/nam-1.14/nam
PATH=$PATH:$XGRAPH:$NS:$NAM

export PATH=$PATH:”/home/johna/ns-allinone-2.34/bin:/home/johna/ns-allinone-2.34/tcl8.4.18/unix:/home/johnans-allinone-2.34/tk8.4.18/unix”
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:”/home/johna/ns-allinone-2.34/otcl-1.13:/home/johna/ns-allinone-2.34/lib”
export TCL_LIBRARY=$TCL_LIBRARY:”/home/johna/ns-allinone-2.34/tcl8.4.18/library”"




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

#Libraries have been installed in:
# /home/johna/ns-allinone-2.34/lib

#If you ever happen to want to link against installed libraries
#in a given directory, LIBDIR, you must either use libtool, and
#specify the full pathname of the library, or use the `-LLIBDIR'
#flag during linking and do at least one of the following:
# - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
# during execution
# - add LIBDIR to the `LD_RUN_PATH' environment variable
# during linking
# - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
# - have your system administrator add LIBDIR to `/etc/ld.so.conf'
 
Old 12-21-2010, 12:41 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@ goodGOD, post # 5 : Welcome to LQ.

Instead of all the troubles with 'setting a path', suggest :
cd ns-allinone-2.34/ns-2.34/
su
make install
..... which will copy 'ns' to /usr/local/bin/

The same can be done with nam : cd ns-allinone-2.34/nam-1.14/ , etc.

Then you will always have ns + nam in a system path :
http://www.linuxquestions.org/questi...ting-818634/#2

..

Last edited by knudfl; 12-21-2010 at 12:45 PM.
 
1 members found this post helpful.
Old 12-22-2010, 05:47 AM   #7
goodGOD
LQ Newbie
 
Registered: Dec 2010
Posts: 14

Rep: Reputation: 0
Dear knudfl and all,


thanks for tips, all ns 2.34 is good and working now.

Please if I want to install NS 3 on the same PC and on Fedora 13.......is it possible ........will there be conflicts between ns 2.34 and ns 3 on the same machine.

I want to work on Optical Network, I was informed by a friend that NS 3 versions may be better but I first thought ns 2.34 should be more stable.


Also this PC IBM Lenovo G555 with Fedora 13 couldn't see the wireless card on the machine. I will like to configure it so as to connect to Wirelss Network. Please what are the steps I should follow to make it. thanks
 
Old 12-22-2010, 05:50 AM   #8
goodGOD
LQ Newbie
 
Registered: Dec 2010
Posts: 14

Rep: Reputation: 0
Also what does this commect means ..........
it occurs after the ns 2.34 installation
I just put it in .bashrc file so as to work on it


#If you ever happen to want to link against installed libraries
#in a given directory, LIBDIR, you must either use libtool, and
#specify the full pathname of the library, or use the `-LLIBDIR'
#flag during linking and do at least one of the following:
# - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
# during execution
# - add LIBDIR to the `LD_RUN_PATH' environment variable
# during linking
# - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
# - have your system administrator add LIBDIR to `/etc/ld.so.conf'
 
Old 12-22-2010, 09:45 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 8 : As the text says : If you ever happen to want to link against installed libraries ...
I.e. installed libraries = ns-allinone-2.34/lib/libtcl* , etc. : If you want to build software,
e.g. a new protocol in ns2, you may have to point to those.
( It has never occurred with anything, I tried to build.)


Post # 7 : ns3 is a totally different simulator software, not at all like ns2.
Nothing will conflict. NS3 is a python application. Please read this ( LQ ns3 thread ) :
http://www.linuxquestions.org/questi...s3-6-a-780999/
http://www.linuxquestions.org/questi...lation-792230/
..
 
1 members found this post helpful.
Old 12-22-2010, 12:40 PM   #10
goodGOD
LQ Newbie
 
Registered: Dec 2010
Posts: 14

Rep: Reputation: 0
A PC IBM Lenovo G555 with Fedora 13 couldn't see the wireless card on the machine.
I will like to configure it so as to connect to Wirelss Network.
Please what are the steps I should follow to make it. thanks
 
Old 10-21-2011, 10:18 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 10 @goodGOD.

Sorry, this is an ns2 thread.
For off topic questions :
Please do not ask questions in a thread started by another LQ member.

Start your own thread :
Forums > Linux Forums > Linux - Distributions : Fedora
http://www.linuxquestions.org/questions/fedora-35/
>>> New Thread.
 
  


Reply



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
Hi everybody Regarding Ns2 in Linux you can see this Blog dimitree LinuxQuestions.org Member Intro 4 03-12-2010 05:30 AM
unable to install ns2.34 on ubuntu 9.10 running on vmworkstation 6 san_as Linux - Newbie 1 02-16-2010 04:10 AM
linux+ns2 naseer85 Linux - Newbie 1 05-07-2009 01:53 PM
linux and ns2 m.alnaas Linux - Laptop and Netbook 1 04-22-2008 05:17 PM
can anyone help me with NS2 in linux abdul-hameed Linux - Software 1 12-29-2005 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:15 AM.

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