How To Install Ns 2.34 Inward Ubuntu 16.04?

Install NS 2.34 inward Ubuntu 16.04 

 guys inward this postal service I am gonna present you lot that how to  How to Install NS 2.34 inward Ubuntu 16.04?
NS-2.34
Hi, guys inward this postal service I am gonna present you lot that how to install NS 2.34 inward Ubuntu 16.04 step yesteryear stepWhile Installing Network Simulator 2 (NS2) you lot postulate to starting fourth dimension brand few changes inward unopen to files. Also, you postulate an active network connexion because you lot postulate to update Ubuntu starting fourth dimension in addition to to download the required few packages to live on pre-installed.

Step: 1

Open a concluding in addition to type the next ascendence i yesteryear one. Wait until the procedure gets consummate in addition to and thus types unopen to other command. Also, brand certain receive got an active network connection.
sudo apt-get update
sudo apt-get install build-essential autoconf automake libxmu-dev
At the fourth dimension of writing this tutorial, gcc-4.9 was the latest version.
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
or you lot tin forcefulness out exercise this directly. Just Right click on the file in addition to click on Extract 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

furnish GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

amongst the following

furnish 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, modify 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 concluding in addition to and thus type the following
cd /ns-allinone-2.34
./install
That's it. . . Now expect for NS2 it volition receive got x to fifteen minutes or perchance more.

Step: nine (Last step)
Open concluding in addition to and thus type the following
gedit .bashrc
And in addition to thus Paste the next code at the END exactly don't forget to modify your User-Name

# 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
Meanwhile, inward the Terminal, if the installation completes without whatever error, in addition to thus unopen the terminal, in addition to reopen it in addition to type the next command:
ns
if % sign appears agency the installation has been successful. Sharing is Caring. If you lot similar this must part it amongst your friends.

Berlangganan update artikel terbaru via email:

0 Response to "How To Install Ns 2.34 Inward Ubuntu 16.04?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel