Install NS 2.34 inwards Ubuntu 16.04
NS-2.34 |
Step: 1
Open a lastly as well as type the next ascendance i past times one. Wait until the procedure gets consummate as well as and then types around other command. Also, brand certain receive got an active mesh connection.
sudo apt-get update |
---|
sudo apt-get install build-essential autoconf automake libxmu-dev |
---|
sudo apt-get install gcc-4.9 |
---|
Step: 2
You volition postulate to Download NS 2.34. (Download Here). After downloading this file Extract it into your root directory using the next command. Don't forget to supervene upon your user name.
tar xvzf ns-allinone-2.34.tar.gz -C /home/YOUR-USER-NAME-HERE |
---|
Step: 3
Now opened upwards ns-allinone-2.34/otcl-1.13/configure
Replace the next line Linux*) SHLIB_CFLAGS="-fpic" SHLIB_LD="ld -shared" SHLIB_SUFFIX=".so" DL_LIBS="-ldl" SHLD_FLAGS="" amongst the following Linux*) SHLIB_CFLAGS="-fpic" SHLIB_LD="gcc -shared" SHLIB_SUFFIX=".so" DL_LIBS="-ldl" SHLD_FLAGS="" |
---|
Step: 4
Now opened upwards ns-allinone-2.34/ns-2.34/tools/ranvar.cc In trouble 219, brand the next changes.
Replace this line supply GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); amongst the following supply GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_); |
---|
Step: 5
Now opened upwards ns-allinone-2.34/ns-2.34/mac/mac-802_11Ext.h In line 65, add the next header.
#include "cstddef" |
---|
Step: 6
Now opened upwards ns-allinone-2.34/ns-2.34/mobile/nakagami.cc
Find the next code if (int_m == m) { resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value(); } else { resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value(); } return resultPower; } And supervene upon amongst the following if (int_m == m) { resultPower = ErlangRandomVariable(Pr/m, int_m).value(); } else { resultPower = GammaRandomVariable(m, Pr/m).value(); } return resultPower; } } |
---|
Step: 7
Now opened upwards ns-allinone-2.34/ns-2.34/linkstate/ls.h
In trouble 137, alter the next line void eraseAll() { erase(baseMap::begin(), baseMap::end()); } And supervene upon amongst the following void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); } |
---|
Step: 8
Now opened upwards Navigate to the ns-allinone-2.34 folder:
Open lastly as well as and then type the following cd /ns-allinone-2.34 ./install |
---|
Step: nine (Last step)
Open lastly as well as and then type the following gedit .bashrc |
---|
# LD_LIBRARY_PATH OTCL_LIB=/home/Your-User-Name/ns-allinone-2.34/otcl-1.13 NS2_LIB=/home/Your-User-Name/ns-allinone-2.34/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/Your-User-Name/ns-allinone-2.34/tcl8.4.18/library USR_LIB=/usr/lib export TCL_LIBRARY=$TCL_LIB:$USR_LIB # PATH XGRAPH=/home/Your-User-Name/ns-allinone-2.34/bin:/home/Your-User-Name/ns-allinone-2.34/tcl8.4.18/unix:/home/Your-User-Name/ns-allinone-2.34/tk8.4.18/unix NS=/home/Your-User-Name/ns-allinone-2.34/ns-2.34/ NAM=/home/Your-User-Name/ns-allinone-2.34/nam-1.14/ PATH=$PATH:$XGRAPH:$NS:$NAM |
---|
ns
if % sign appears agency the installation has been successful. Sharing is Caring. If yous similar this must portion it amongst your friends.