NS2 is deployed in ubuntu 16.04 LTS.
However, this error appears.
****************$ns
%nam
child killed:segmentation violation
What action should I take to set up NS2?
I'm sorry, but could you teach me?
Here's how to set it up:
gedits.h
Change some files ls.h
Line 137
VoideraseALL() {erase(baseMap::begin(), base::end());}
↓
VoideraseALL() {this->erase(baseMap::begin(), base::end());}
(*this->
added)
In ns-allinone-2.35/, ./install
Back to Home Directory
gedit.bashrc
Added to end of file .bashrc.Enter the username you configured during Ubuntu setup.
Add to bottom
#LD_LIBRARY_PATH
OTCL_LIB=/home/username/ns-allinone-2.35/otcl-1.14
NS2_LIB=/home/Username/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB =/usr/local/lib
exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/username/ns-allinone-2.35/tcl 8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/username/ns-allinone-2.35/bin:/home/username/ns-allinone-2.35/tcl8.5.10/unix:/home/username/ns-allinone-2.35/tk8.5.10/unix
# the above two lines starting from xgraph and ending with unix should come on the same line
NS=/home/username/ns-allinone-2.35/ns-2.35/
NAM=/home/username/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM
8.Verify that the ns
prompt "%" is displayed on the terminal
9. Enter nam
and complete when the NAM-The Network Animator starts
At the same time as the error, the Ubuntu window appears saying, "Unfortunately, the application nam has stopped unexpectedly."
Note:
$gcc --version
gcc (Ubuntu 5.4.0-6ubuntu 1 to 16.04.10) 5.4.0 20160609
I am asking the same question at the Ubuntu Japanese Forum.
https://forums.ubuntulinux.jp/viewtopic.php?id=20177
This problem was solved by setting the version of nam to 1.14.
Thank you, everyone.
© 2024 OneMinuteCode. All rights reserved.