Hi,
 Thank you all for helping me to solve this problem.The reason for getting
"bash: ns: command not found" error was trying to run NS by typing "ns", not
"./ns".
 Now I can use NS and also NAM by going to their directories in Cygwin
prompt which is a little bit hard, especially for those who categorize their
projects in different directories.I have added both NS and NAM directories
to my PATH (in .bashrc) correctly but the response to echo $PATH differs
from what i defined in .bashrc.
 When the PATH is " PATH=$PATH:${NSHOME}/ns-2.35:${NSHOME}/nam-1.15 " I get
the following response in the answer to echo $PATH

mo...@mobin ~
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Program Files/PC Connectivity
Solution/
:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/W
bem:/cygdrive/c/Program Files/Intel/WiFi/bin/:/cygdrive/c/Program
Files/Microsof
t SQL Server/90/Tools/binn/:/cygdrive/c/php5:/cygdrive/c/Program
Files/MySQL/MyS
/nam-1.15/home/Mobin/ns-allinone-2.35-RC6-2.35-RC6

 To simplify PATH for debugging I removed $PATH in PATH and changed it this
way:
  PATH=${NSHOME}/ns-2.35:${NSHOME}/nam-1.15
 and with this value for PATH environment variable, echo $PATH prints this:

mo...@mobin ~
$ echo $PATH
/nam-1.15/home/Mobin/ns-allinone-2.35-RC6

 Which doesn't sounds correct to me.do you have any idea about this?

 Thanks,
 Mobin


On Mon, Sep 6, 2010 at 5:52 PM, Tom Henderson <t...@tomh.org> wrote:

> On 9/6/10 9:54 AM, Mobin Yazarlou wrote:
>
>>
>> Hi Gang,
>>  Thanks for your answer.I found that those warnings were because of the
>> following two lines in .bashrc file:
>>
>> unset TMP
>> unset TEMP
>>
>>  Removing these two directions eliminates warnings.
>>
>>  After removing all comments and the mentioned directions from .bashrc, I
>> changed the environment variables this way (thanks T. Issaraiyakul for his
>> helpful Slides on NS installation):
>>
>> NSHOME=~/ns-allinone-2.35-RC6
>> OTCL_LIB=${NSHOME}/otcl-1.14
>> NS2_LIB=${NSHOME}/lib
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB
>> export TCL_LIBRARY=${NSHOME}/tcl8.5.8/library
>> PATH=$PATH:${NSHOME}/ns-2.35:${NSHOME}/nam-1.15
>>
>>  And now the response to 'ns' command in Cygwin prompt is as follows:
>>
>> mo...@mobin ~
>> $ ns
>> bash: ns: command not found
>>
>>  I don't know why this happens but I'm pretty sure that 'ns.exe' exists in
>> 'ns-2.35' folder, which is declared in PATH.
>>
>>  Is there any suggestion to overcome this problem?
>>
>>  Thanks,
>>  Mobin
>>
>
>
>
> Can you try this?
>
> cd ${NSHOME}/ns-2.35
> ./ns
>
> Can you try
> echo $PATH
> and see if ns is in your path?
>
> - Tom
>
> - Tom
>




On Mon, Sep 6, 2010 at 6:40 PM, Teerawat Issariyakul <teera...@ece.ubc.ca>wrote:

>
> Hi,
>
> Which directory are you executing ns.exe?
>
> Can you try to go to ns2 directory and do it again?
>
> Best Regards,
>
> Teerawat Issariyakul
> http://www.ns2ultimate.com/
> http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417
> http://twitter.com/T_Bear
> http://www.t-issariyakul.blogspot.com
> http://www.ece.ubc.ca/~teerawat <http://www.ece.ubc.ca/%7Eteerawat>
>
>
>
>
> On 9/6/2010, "Mobin Yazarlou" <yazarlo...@gmail.com> wrote:
>
> >
> >Hello,
> > I've installed "ns-allinone-2.35-RC6" on the latest version of Cygwin
> (1.7)
> >in WinXP twice but I still get the following error
> >when I try to run NS2 by typing "ns" in cygwin prompt.
> >
> >mo...@mobin ~
> >$ ns
> >/home/Mobin/ns-allinone-2.35-RC6/ns-2.35/ns.exe: error while loading
> shared
> >libr
> >aries: ?: cannot open shared object file: No such file or directory
> >
> >
> > The three lines that i've added to .bashrc are these:
> >
> >export
>
> >LD_LIBRARY_PATH=/home/Mobin/ns-allinone-2.35-RC6/otcl-1.14:/home/Mobin/ns-allinone-2.35-RC6/lib
> >export TCL_LIBRARY=/home/Mobin/ns-allinone-2.35-RC6/tcl8.5.8/library
>
> >PATH=/home/Mobin/ns-allinone-2.35-RC6/bin:/home/Mobin/ns-allinone-2.35-RC6/tcl8.5.8/unix:/home/Mobin/ns-allinone-2.35-RC6/tk8.5.8/unix
> >
> > And another important thing to mention is the following warnings which
> >appear right after opening Cygwin prompt.
> >
> > ': not a valid identifier
> > ': not a valid identifier
> >
> > mo...@mobin ~
> > $
> >
> > Could anyone help me to fix this problem?
> >
> > Thanks,
> > Mobin
> >
>

Reply via email to