Hello Guys,
This is my first technical post. I installed Ns2.35 using ns-allinone-2.35. So here are the steps.
1. Download ns-allinone-2.35 from http://mac.softpedia.com/progDownload/ns-2-Download-59777.html
2. Now you have to resolve some dependencies.
( i.) su
( ii.) yum install autoconf
( iii.) yum install automake
( iv.) yum install gcc-c++
( v.) yum install libX11-devel
( vi.) yum install xorg-x11-proto-devel
( vi.) yum install libXt-devel
( vi.) yum install libXmu-devel
3. Place downloaded file in home directory and type tar -xzvf ns-allinone
-2.35
.tar.gz
4.cd ns-allinone
-2.35
5. Now ./install
Error encountered by me:-
In file included from linkstate/ls.cc:67:0:
linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!
Solution:
1. Go to ns-allinone-2.35/ns-2.35/linkstate/
2. Now edit ls.h
In line number 137, in place of void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
make it void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
3. Save the file and again run ./install
This is a correct procedure to work in ns2-35 version
sir error is coming while installing yum install autoconf, the error is cannot retrieve metalink rep, fedora, plz verify the path
Thanks a lot, that helped
I can’t edit my ls.h file,it always says access denied…how do i proceed next?
try editing using sudo command. You will get the access.
hi
hello…… i m unable to save the changes
it says that u r not the owner and u r not allowed to change these permissions
Try to change the file using sudo command, you will get the root access and you will be able to save the changes.
This solution is also works on Fedora 18.
how to edit ls.h using sudo in fedora
plz tell me i dont know to edit by using sudo
Type `sudo nano ls.h`
sorry,after type’ sudo nano ls.h’ terminal shows with menu bar in the top and some preferences but i cant do any thing after this step
Are you giving complete address of ls.h?
no, i just give ‘sudo nano ls.h’ how to give with path.Bcz i am new to fedora and ns2
Go to this directory “ns-allinone-2.35/ns-2.35/linkstate/” and then type “sudo nano ls.h”. nano is a command line text editor and “ls.h” is a file which you have to edit. sudo is to give it root permissions to do these operations.
Hope this would help you!
How to set path plese tell me elaborately with commands
where to paste the path
I never told you to paste any path. Have you downloaded ns-allinone-2.35? If yes, have you extracted this directory? Can you see a folder with name ns-allinone-2.35?
yes, i see ns-allinone-2.35 folder in my home directory and I also editl ls.h,
I put this command in my terminal [root@localhost ns-allinone-2.35]# ./install
it shows the following:
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.5.10: /home/mala/ns-allinone-2.35/{bin,include,lib}
tk8.5.10: /home/mala/ns-allinone-2.35/{bin,include,lib}
otcl: /home/mala/ns-allinone-2.35/otcl-1.14
tclcl: /home/mala/ns-allinone-2.35/tclcl-1.20
ns: /home/mala/ns-allinone-2.35/ns-2.35/ns
nam: /home/mala/ns-allinone-2.35/nam-1.15/nam
xgraph: /home/mala/ns-allinone-2.35/xgraph-12.2
gt-itm: /home/mala/ns-allinone-2.35/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns
———————————————————————————-
Please put /home/mala/ns-allinone-2.35/bin:/home/mala/ns-allinone-2.35/tcl8.5.10/unix:/home/mala/ns-allinone-2.35/tk8.5.10/unix
into your PATH environment; so that you’ll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/mala/ns-allinone-2.35/otcl-1.14, /home/mala/ns-allinone-2.35/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
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=
(2) You MUST put /home/mala/ns-allinone-2.35/tcl8.5.10/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.35; ./validate
For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
This message indicates ns-2 has been succefully installed in your system. This message is suggesting you that you can add given paths to your PATH Environment(“Which means you can execute those commands from any directory.”) Have you validated the settings? using the way they suggested?
after pasting the path in bash_profile what can i do
How to save bash_profile?
which is path environment where do i add tell me clearly
or
i go through validate by the command ./validate
and also i validate with out add given path to my path environment
after validation i type the commands ‘ns’ & nam both shows me that command not found
guide me please
sorry to disturb you
Its completely Ohk. Can you execute these commands:
1. cd
2. ls -la
And post the output.
I paste the path in bash_profile after that I save that
Then I type the command source .bash_profile
Then I type the command ns
then I got the symbol %
then l type ls
Then I type the command ns exl.tcl
it shows:
could not rread the file “exl.tcl”: no such file or directory
I am not clear with what you are trying to do. You want to execute ns, ryt? You are getting % symbol, that’s its begining. After that are you doing “ls” without exiting ns?
notyhing coming with that ls-la command
You need to give a space between ls -la
After that i doing “ls” without exiting ns i got
anaconda-ks.cfg ns-allinone-2.35 ns-allinone-2.35-tar-gz
after that i type command xgraph
but it(cursor) simply go to next line in terminal
what i do i cant run the pgm in xgraph window
and tell me how to run
I did all this stuff 7-8 months back and very basic things. I am not the right person to explain you further. You can try on other blogs. I can help you in searching such blogs.
tell some blogs related to ns2 installation
IN UBUNTU HW TO INSTALL N?
S-2
i install ns2 successfully and i doing my project in ns2
thank u milanjain
thank u …
respected sir i installed ns2.35 successfully on fedora 17. but when applied ./validate it gives me output that s
=====================================================
validate overall report: some portable tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
some non-portable tests also failed:
./test-all-session
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
=======================================================================
plz tell me how can do full validation without any failure,,, i am stuck to this problem from last 3 weeks,,,,, i would be very very very very very thankfull to u if u mentioend me the reason of failure of some test…
thanks in advance
Thankssssss A lotttttttttttttttt……….. Works like charm……
I intalled ns2 on federo 7, my ns is working fine, iw when i type ns it will prompt % sign
but my nam is not working,after running ns /tcl, its creating thge .nam file but
it contains o bytes in that one, I ma not getting whats is the Problem
how can I check ns2.35 is install
thank u for the steps…
bt even after following them properly i m geting this error of ns command not found ???
what should i do ?
Have you installed everything using sudo?
i edited that line using sudo nano ls.h ..but i cant save that…how to save… can uhelp
Ctrl + O -> Enter (To Save)
Ctrl + X (To Exit)
thank you it worked… but after that I got “installation successful” and
(1) You MUST put /home/mala/ns-allinone-2.35/otcl-1.14, /home/mala/ns-allinone-2.35/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
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=
(2) You MUST put /home/mala/ns-allinone-2.35/tcl8.5.10/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
how to proceed after this?
im new to this.. can you please tell what I should edit in .bash_profile
I am not sure why you want to edit .bash_profile? you can directly run these commands to set the path.
In file included from linkstate/ls.cc:67:0:
linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:58: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
^
linkstate/ls.h:137:58: note: declarations in dependent base ‘std::map<int, LsIdSeq, std::less, std::allocator<std::pair > >’ are not found by unqualified lookup
linkstate/ls.h:137:58: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!
how to solve this problem??
i tried “this->” but doesn’t help!!
please help me with this problem
Can you post the modified code? It would be easy for me to debug then.
Hi,
I already made a change to linkstate/ls.h (this->erase) one. Getting an error when trying to install ns-2.30 on a Win7 machine using cygwin 64-bit:
linkstate/ls.h:133:44: required from ‘LsMap::iterator LsMap::insert(const Key&, const T&) [with Key = int; T = LsIdSeq; LsMap::iterator = std::_Rb_tree_iterator<std::pair >]’
linkstate/ls.cc:421:50: required from here
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/ext/new_allocator.h:130:9: error: no matching function for call to ‘operator new(sizetype, void*)’
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/ext/new_allocator.h:130:9: note: candidate is:
:0:0: note: void* operator new(long unsigned int)
:0:0: note: candidate expects 1 argument, 2 provided
Makefile:90: recipe for target ‘linkstate/ls.o’ failed
make: *** [linkstate/ls.o] Error 1
Would you please help me here?
Thanks in advance!
Sanil
hello sir, i have completely installed the ns2 . bt when i type ls command it does n’t show anaconda-ks.cfg file . Is it important for ns2 ? can we run ns2 without this file.
Sorry, but I have no idea about this file.
sir when i type the xgraph command it nothing to do. plz tell me what is the problem
I think your queries are more related to post installation of ns2. This is not a proper place to ask these queries. I think you should google it. My suggestion would be if you think you are doing things the right way and still they are not working, reinstall ns2 in above mentioned way.
Hello sir, i have done validation completely but when i type ns which is the last command for completing installation, it throws an error “command not found”. sir, please tell me what is the problem with it why its not working?
I think this might help you to start ns2 programming. – Link
Error in nam file…. ( ns2) fedora..
It shows that ” could not execute nam” no such files or directory… Plz help..