- Download ns-allinone-2.31 from sourceforge.net
- Un-tar the source file
- Install build-essential, autoconf, automake & libxmu-dev
- Run installation by using this script below. User should in ns-allinone-2.31 directory of ns-allinone
- Setting environment variable
Add this script bellow on your bashrc file (the last line), remember to rename "/home/nra" based on your computer name.
-------------------------------------------------------------------------------------------
# LD_LIBRARY_PATH OTCL_LIB=/home/nra/ns-allinone-2.31/otcl-1.13 NS2_LIB=/home/nra/ns-allinone-2.31/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/nra/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/nra/ns-allinone-2.31/bin:/home/nra/
ns-allinone-2.31/tcl8.4.14/unix:/home/nra/ns-allinone-2.31/tk8.4.14/unix
NS=/home/nra/ns-allinone-2.31/ns-2.31/
NAM=/home/nra/ns-allinone-2.31/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
----------------------------------------------------------------------------------------------------
Run this script to affect the setting
$source ~./bashrc
- Test NS2 installation, run this script. If '%' mark appear it mean your installation is complete. If not, you should reboot your system.
$%
- Validate NS2. Under directory ns-allinone-2.31/ns-2.31 run this script. It will take several time to complete the validation.
Reference : Alkautsarpens
1 comment:
hi. i got this error during installation. can u help 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!
Post a Comment