i've to edit the line number 137 of ns-2.35/linkstate/ls.h
from
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
to
void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
and my ns2 installation is a success. however inside kali-linux. in ubuntu, though i set the path correctly and it showed the message that nam installed successfully, nam is not working and showing error that it's not installed.
if you want to validate, it'll show some fails. you can correct them by installing libperl4-corelibs-perl
using
sudo apt-get install libperl4-corelibs-perl
or if you have apt-fast installed then
sudo apt-fast install libperl4-corelibs-perl
if anyone can help me with the nam installation problem in ubuntu. it'll be usefull.