Sei sulla pagina 1di 3

*Copy ns-allinone-2.35. tar.

gz to home directory

*Right click on ns-allinone-2.35.tar.gz then select "extract here"

*Close the home directory.

Check INTERNET connection.Then

update ubuntu(in show Applications icon- software updater) after


this

*From desktop open the terminal then copy & paste below 3 commands one by
one(each time press enter Key)

sudo apt update (check for internet connection)

sudo apt install ns2

sudo apt install nam

Check successful installation by typing ns in open terminal press


enter key we get % mark.

For program check copy tcl programs to below dirctory

cd ns-allinone-2.35/ns-2.35/tcl/ex/

then type ns pt-pt.tcl press enter key we get the result.

OR………………….……………..OR…………………………………..OR………………………………………..OR………………..

*Copy ns-allinone-2.35. tar.gz to home directory

*Right click on ns-allinone-2.35.tar.gz then select "extract here"

*Close the home directory.

*From desktop open the terminal then copy & paste below commands one by one(each
time press enter Key)

tar -xvzf ns-allinone-2.35.tar.gz

sudo sudo apt-get install build-essential autoconf automake libxmu-dev

sudo apt-get install gcc

cd ns-allinone-2.35/ns-2.35/linkstate/

gedit ls.h .........then click on SAVE & close


void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }

cd ..

cd ..

cd otcl-1.14/

sudo gedit Makefile.in ......then click on SAVE & close

CD ..

./install

sudo gedit ~/.bashrc .......then click on SAVE & close

# LD_LIBRARY_PATH

OTCL_LIB=/home/admin1/ns-allinone-2.35/otcl-1.14

NS2_LIB=/home/admin1/ns-allinone-2.35/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/admin1/ns-allinone-2.35/tcl8.5.10/library

USR_LIB=/usr/lib

export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH

XGRAPH=/home/admin1/ns-allinone-2.35/bin:/home/admin1/ns-allinone-
2.35/tcl8.5.10/unix:/home/admin1/ns-allinone-2.35/tk8.5.10/unix

#the above two lines beginning from xgraph and ending with unix should come on
the same line

NS=/home/admin1/ns-allinone-2.35/ns-2.35/

NAM=/home/admin1/ns-allinone-2.35/nam-1.15/

PATH=$PATH:$XGRAPH:$NS:$NAM

source ~/.bashrc
sudo apt-get install libperl4-corelibs-perl
sudo apt-get install xgraph

sudo apt install ns2


sudo apt install nam

if error occurs like “Command 'ns' not found, but can be installed with:

sudo apt install ns2 then do following steps.

sudo apt update (check for internet connection)

sudo apt install ns2

sudo apt install nam

Even after this if it gives same error then update ubuntu(in show
Applications icon- software updater) then again follow above three
steps.

If “UNABLE TO LOCATE XGRAPH” message appears then install below


commands one by one

sudo apt install perl libxt-dev libx11-dev libxmu-dev

wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xgraph/xgraph_12.1-
17_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-6_1.6.4-
3ubuntu0.2_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.27-
3ubuntu1_amd64.deb

sudo dpkg -i *.deb

Potrebbero piacerti anche