Posts Tagged ‘install’

How to Install NS-2 in Ubuntu

February 12, 2013 28 comments

I presume that you already know what NS-2 is. I am gonna skip the details, and show you the steps that you need to follow for NS2 installation.

Download NS-allinone-2.35 from here. And, unzip your contents to your desired location. For example:

tar -zxvf ns-allinone-2.35.tar.gz -C /home/your_user_accnt

Before you install NS-2, please install some essential packages:

sudo apt-get install tcl8.5-dev tk8.5-dev

sudo apt-get install gcc-4.4 g++-4.4

sudo apt-get install build-essential autoconf automake

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

Open OTcl make file and change CC = @CC@ to CC=gcc-4.4, and save it. i.e.

gedit /home/your_user_accnt/ns-allinone-2.35/otcl-1.14/

Remove  CC = @CC@ and paste CC=gcc-4.4

You are now ready to install your ns-2.

cd /home/your_user_accnt/ns-allinone-2.35


Now, you need to set some environmental variables to your hidden bashrc file.

gedit ~/.bashrc

Go to the end of the file and append the following lines :
















Save, close and reload the bashrc file.

source ~/.bashrc

If you have completed all the steps successfully, then you should be able to run NS-2. Try the following to see :

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

ns simple.tcl

Make sure, you replace your_user_accnt with your user name.


Categories: NS-2 Tags: , , , ,

Installing gnuplot in Mac OS X

February 10, 2013 33 comments

The easiest way of installing gnuplot is using macports. Just Install macports and run “sudo port install gnuplot” , and this will install gnuplot along with all the dependencies. If you don’t want to install macports, then you can proceed with the following steps.

Before you download and install the gnuplot, you need to download Read Line lib for gnuplot. Perform the following to install read line lib:

  1. Download the latest read line lib source from here.
  2. Unzip the downloaded file, and copy the file to the location you want to install (i.e.  /user/your_acct/local).
  3. go to shlib subfolder, and open Makefile. Search -dynamic and change it to -dynamiclib. You may find an error saying: use dynamiclib instead of dynamic
  4. Go to the directory and run the following command.


make install

Now, you can install gnuplot. Perform the following steps:

  1. Download the latest gnuplot source packages from here.
  2. Unzip it, and go to that working directory.
  3. And, run the following for the installation


make install

That’s all. Now you can type, gnuplot and start using it 🙂

Special thanks to Bhou for your helpful post regarding gnuplot installation.