Segmentation fault (core dumped) in nam ubuntu 14.04 [closed]
Do not install via terminal.
Download ns-allinone-2.35.tar.gz file from https://sourceforge.net/projects/nsnam/
Install the following dependicies
sudo apt-get install tcl8.5-dev tk8.5-dev gcc-4.4 g++-4.4 build-essential autoconf automake perl xgraph libxt-dev libx11-dev libxmu-dev.
Extract ns-allinone-2.35.tar.gz
open ns-allinone-2.35/ns-2.35/linkstate/ls.h
file.
go to line number 137.
change
"void eraseAll() {erase(baseMap::begin(), baseMap::end());}"
to
"void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }"
then goto ns-allinone-2.35 directory
cd home/isysway/ns-allinone-2.35/
./install
it takes some time
come to home directory
isysway@isysway:~$ sudo gedit .bashrc
a text file will open
go to end of the file
add the following line
PATH=$PATH:/home/isysway/ns-allinone-2.35/bin:/home/isysway/ns-allinone-2.35/tcl8.5.10/unix:/home/isysway/ns-allinone-2.35/tk8.5.10/unix
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/isysway/ns-allinone-2.35/otcl-1.14/lib:/home/isysway/ns-allinone-2.35/lib
TCL_LIBRARY=$TCL_LIBRARY:/home/isysway/ns-allinone-2.35/tcl8.5.10/library
export PATH
export LD_LIBRARY_PATH
export TCL_LIBRARY
note:my user name is "isysway" you replace it with yours
isysway@isysway:~$source .bashrc
then
isysway@isysway:~$ns
%
if the modulo symbol comes you did it.
Make sure you installed NS correctly. How ? east download one TCl file which does not run nam. If you do not know nam is just for depicting the algorithm graphically. After download and run TCL file ( As I said download nam free or at least your self disable that line or make them as comment on your TCL file .
There is some problems on running nam on 14.04 . You should download nam from here and copy the extracted file in to your /usr/local/bin . But I just test that for ubuntu 32 bit 14.04 .
By the way if you are new to NS2. I should tell you it not necessary to follow erlang NS2 method. If you are enough not in horry I recommend you to look at here: http://www.linuxquestions.org/questions/linux-newbie-8/ns2-version-2-34-is-too-old-wpan-802-15-4-a-4175499373/