Problem in installing ns2.34

View: New views
4 Messages — Rating Filter:   Alert me  

Problem in installing ns2.34

by iimene :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

  *
*After installing ns2.34 , I have tryed  ns command but it returns *"ns
command not found"
**
*
I have followed these steps:


1) su , password
2) yum install libX11-devel libXext-devel libXau-devel libXmu-devel
3) exit
4) tar xvf ns-allinone-2.34.tar.gz
5) cd ns-allinone-2.34
6) ./install
7) To set enviroment variables, I have done like this

cd /etc
gedit ~/.bashrc

then I have added these lines on the file .bshrc

*# LD_LIBRARY_PATH
OTCL_LIB=/home/Imene/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/Imene/ns-allinone-2.34/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB

# TCL_LIBRARY
TCL_LIB=/home/Imene/ns-allinone-2.34/tcl8.4.18/library
export TCL_LIBRARY=$TCL_LIB

# PATH
XGRAPH=/home/Imene/ns-allinone-2.34/bin:/home/Imene/ns-allinone-2.34/tcl8.4.18/unix:/home/Imene/ns-allinone-2.34/tk8.4.18/unix
NS=/home/Imene/ns-allinone-2.34/ns-2.34/
NAM=/home/Imene/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM*

after that I saved the .bshrc file and I closed it

*source ~/.bashrc*  (to save changes in the .bshrc file)


8) cd ns-2.34/
9) ./validate

after ./ validate this message appears:

*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: some portable tests failed:
./test-all-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
*

Then when I have tryed

*cd Imene/ns-allinone-2.34/ns-2.34/
./ns*

' % ' is displayed

and when I tryed
*cd Imene/ns-allinone-2.34/nam-1.14/
./nam*

the "Nam Console was opened, so nam is OK.

and when I tryed the echo command it return

*[Imene@localhost ~]$ echo LD_LIBRARY_PATH
LD_LIBRARY_PATH
[Imene@localhost ~]$ echo TCL_LIBRARY
TCL_LIBRARY
[Imene@localhost ~]$ echo PATH
PATH*

I can't understand from what the problem?


Could you please explain me what is the problem?



Thanks a lot for your help !!!

Re: Problem in installing ns2.34

by BilalAKhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I can see the way you have installed NS-2.I think it is fine. Whenever % sign appears after writing ns or ./ns it means that ns-2 has been installed successfully. but do not start you nam with ./nam. it will not work and you do not have to be the power user for writing a program as well. If you are in linux, simply type 'vi example1.tcl'. It will open up an editor and create a file named 'example1.tcl' in your home directory. Press insert and write what ever script you wanna write there. I would suggest try script already in the examples of tutorials. Once script has been written press Esc and write ':wq'. This will write 'example1.tcl' premanently and quit the screen.

now its time to run the script. Give the command ns example1.tcl and press enter. there you go... First example of ns-2 will be infront of you in the shape of nam editor.

Try this way and if any problems, do not hesitate to ask me.

Regards,

Bilal A. Khan

iimene wrote:
Hello,

  *
*After installing ns2.34 , I have tryed  ns command but it returns *"ns
command not found"
**
*
I have followed these steps:


1) su , password
2) yum install libX11-devel libXext-devel libXau-devel libXmu-devel
3) exit
4) tar xvf ns-allinone-2.34.tar.gz
5) cd ns-allinone-2.34
6) ./install
7) To set enviroment variables, I have done like this

cd /etc
gedit ~/.bashrc

then I have added these lines on the file .bshrc

*# LD_LIBRARY_PATH
OTCL_LIB=/home/Imene/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/Imene/ns-allinone-2.34/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB

# TCL_LIBRARY
TCL_LIB=/home/Imene/ns-allinone-2.34/tcl8.4.18/library
export TCL_LIBRARY=$TCL_LIB

# PATH
XGRAPH=/home/Imene/ns-allinone-2.34/bin:/home/Imene/ns-allinone-2.34/tcl8.4.18/unix:/home/Imene/ns-allinone-2.34/tk8.4.18/unix
NS=/home/Imene/ns-allinone-2.34/ns-2.34/
NAM=/home/Imene/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM*

after that I saved the .bshrc file and I closed it

*source ~/.bashrc*  (to save changes in the .bshrc file)


8) cd ns-2.34/
9) ./validate

after ./ validate this message appears:

*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: some portable tests failed:
./test-all-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
*

Then when I have tryed

*cd Imene/ns-allinone-2.34/ns-2.34/
./ns*

' % ' is displayed

and when I tryed
*cd Imene/ns-allinone-2.34/nam-1.14/
./nam*

the "Nam Console was opened, so nam is OK.

and when I tryed the echo command it return

*[Imene@localhost ~]$ echo LD_LIBRARY_PATH
LD_LIBRARY_PATH
[Imene@localhost ~]$ echo TCL_LIBRARY
TCL_LIBRARY
[Imene@localhost ~]$ echo PATH
PATH*

I can't understand from what the problem?


Could you please explain me what is the problem?



Thanks a lot for your help !!!
Regards,

Bilal A. Khan

Re: Problem in installing ns2.34

by iimene :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

thank you for your response but when I 'm trying the first example given in tutorial

it returns this

---------------------------------------------------------------------------------------
[Imene@localhost Imene-test]$ ../ns simple.tcl
210
0.0037499999999999999
running nam...
ns: finish: couldn't execute "nam": no such file or directory
    while executing
"exec nam out.nam &"
    (procedure "finish" line 8)
    invoked from within
"finish"

-------------------------------------------------------------------------------------------
I think that it can't recognize nam module but when i have tested
 cd Imene/ns-allinone-2.34/nam-1.14/
./nam   the nam editor displays

Could you please explain me what is the problem

thanks



Hi,

I can see the way you have installed NS-2.I think it is fine. Whenever % sign appears after writing ns or ./ns it means that ns-2 has been installed successfully. but do not start you nam with ./nam. it will not work and you do not have to be the power user for writing a program as well. If you are in linux, simply type 'vi example1.tcl'. It will open up an editor and create a file named 'example1.tcl' in your home directory. Press insert and write what ever script you wanna write there. I would suggest try script already in the examples of tutorials. Once script has been written press Esc and write ':wq'. This will write 'example1.tcl' premanently and quit the screen.

now its time to run the script. Give the command ns example1.tcl and press enter. there you go... First example of ns-2 will be infront of you in the shape of nam editor.

Try this way and if any problems, do not hesitate to ask me.

Regards,

Bilal A. Khan

iimene wrote:
Hello,

  *
*After installing ns2.34 , I have tryed  ns command but it returns *"ns
command not found"
**
*
I have followed these steps:


1) su , password
2) yum install libX11-devel libXext-devel libXau-devel libXmu-devel
3) exit
4) tar xvf ns-allinone-2.34.tar.gz
5) cd ns-allinone-2.34
6) ./install
7) To set enviroment variables, I have done like this

cd /etc
gedit ~/.bashrc

then I have added these lines on the file .bshrc

*# LD_LIBRARY_PATH
OTCL_LIB=/home/Imene/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/Imene/ns-allinone-2.34/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB

# TCL_LIBRARY
TCL_LIB=/home/Imene/ns-allinone-2.34/tcl8.4.18/library
export TCL_LIBRARY=$TCL_LIB

# PATH
XGRAPH=/home/Imene/ns-allinone-2.34/bin:/home/Imene/ns-allinone-2.34/tcl8.4.18/unix:/home/Imene/ns-allinone-2.34/tk8.4.18/unix
NS=/home/Imene/ns-allinone-2.34/ns-2.34/
NAM=/home/Imene/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM*

after that I saved the .bshrc file and I closed it

*source ~/.bashrc*  (to save changes in the .bshrc file)


8) cd ns-2.34/
9) ./validate

after ./ validate this message appears:

*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: some portable tests failed:
./test-all-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
*

Then when I have tryed

*cd Imene/ns-allinone-2.34/ns-2.34/
./ns*

' % ' is displayed

and when I tryed
*cd Imene/ns-allinone-2.34/nam-1.14/
./nam*

the "Nam Console was opened, so nam is OK.

and when I tryed the echo command it return

*[Imene@localhost ~]$ echo LD_LIBRARY_PATH
LD_LIBRARY_PATH
[Imene@localhost ~]$ echo TCL_LIBRARY
TCL_LIBRARY
[Imene@localhost ~]$ echo PATH
PATH*

I can't understand from what the problem?


Could you please explain me what is the problem?



Thanks a lot for your help !!!


Re: Problem in installing ns2.34

by BilalAKhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

First of all this sort of an error comes when there some missing part in the installation. Make sure that everything is installed successfully. Also make sure that environment variables have been registered correctly. Take this NS-2+Installation+Manual.doc and see the way environment variables have been registered.

I have only one problem, that I can not run XGRAPH. So this document can help you temporarily. Another thing before checking any thing, please try to run your simulation by ns simple.tcl not by ../ns simple.tcl. I hope it would work. Only write ns simple.tcl.

Regards,

Bilal A. Khan



Hi,

thank you for your response but when I 'm trying the first example given in tutorial

it returns this

---------------------------------------------------------------------------------------
[Imene@localhost Imene-test]$ ../ns simple.tcl
210
0.0037499999999999999
running nam...
ns: finish: couldn't execute "nam": no such file or directory
    while executing
"exec nam out.nam &"
    (procedure "finish" line 8)
    invoked from within
"finish"

-------------------------------------------------------------------------------------------
I think that it can't recognize nam module but when i have tested
 cd Imene/ns-allinone-2.34/nam-1.14/
./nam   the nam editor displays

Could you please explain me what is the problem

thanks


BilalAKhan wrote:
Hi,

I can see the way you have installed NS-2.I think it is fine. Whenever % sign appears after writing ns or ./ns it means that ns-2 has been installed successfully. but do not start you nam with ./nam. it will not work and you do not have to be the power user for writing a program as well. If you are in linux, simply type 'vi example1.tcl'. It will open up an editor and create a file named 'example1.tcl' in your home directory. Press insert and write what ever script you wanna write there. I would suggest try script already in the examples of tutorials. Once script has been written press Esc and write ':wq'. This will write 'example1.tcl' premanently and quit the screen.

now its time to run the script. Give the command ns example1.tcl and press enter. there you go... First example of ns-2 will be infront of you in the shape of nam editor.

Try this way and if any problems, do not hesitate to ask me.

Regards,

Bilal A. Khan

iimene wrote:
Hello,

  *
*After installing ns2.34 , I have tryed  ns command but it returns *"ns
command not found"
**
*
I have followed these steps:


1) su , password
2) yum install libX11-devel libXext-devel libXau-devel libXmu-devel
3) exit
4) tar xvf ns-allinone-2.34.tar.gz
5) cd ns-allinone-2.34
6) ./install
7) To set enviroment variables, I have done like this

cd /etc
gedit ~/.bashrc

then I have added these lines on the file .bshrc

*# LD_LIBRARY_PATH
OTCL_LIB=/home/Imene/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/Imene/ns-allinone-2.34/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB

# TCL_LIBRARY
TCL_LIB=/home/Imene/ns-allinone-2.34/tcl8.4.18/library
export TCL_LIBRARY=$TCL_LIB

# PATH
XGRAPH=/home/Imene/ns-allinone-2.34/bin:/home/Imene/ns-allinone-2.34/tcl8.4.18/unix:/home/Imene/ns-allinone-2.34/tk8.4.18/unix
NS=/home/Imene/ns-allinone-2.34/ns-2.34/
NAM=/home/Imene/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM*

after that I saved the .bshrc file and I closed it

*source ~/.bashrc*  (to save changes in the .bshrc file)


8) cd ns-2.34/
9) ./validate

after ./ validate this message appears:

*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: some portable tests failed:
./test-all-red
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
*

Then when I have tryed

*cd Imene/ns-allinone-2.34/ns-2.34/
./ns*

' % ' is displayed

and when I tryed
*cd Imene/ns-allinone-2.34/nam-1.14/
./nam*

the "Nam Console was opened, so nam is OK.

and when I tryed the echo command it return

*[Imene@localhost ~]$ echo LD_LIBRARY_PATH
LD_LIBRARY_PATH
[Imene@localhost ~]$ echo TCL_LIBRARY
TCL_LIBRARY
[Imene@localhost ~]$ echo PATH
PATH*

I can't understand from what the problem?


Could you please explain me what is the problem?



Thanks a lot for your help !!!
Regards,

Bilal A. Khan