NS2 installation problems in ubuntu

Posted by Shashank Krishna Sunday, October 11, 2009

sharethis: The ns2 version taken here is 2.31, if you downloaded any other version, please modify your version during installation

1)Uncompress the ns2

tar zxvf ns-allinone-2.31.tar.gz
gzip -d ns-allinone-2.31.tar.gz
tar xvf ns-allinone-2.31.tar

2) cd /opt/ns-allinone-2.31 (since /opt is the folder which is unused, so i have selected that folder to install, however you can install that in any folder)

3) ./install (execute the command)

4) If the installation fails in the middle, then try to install the linux packages that are

necessary to run NS2. (In any linux (ubuntu or fedora or redhat or suse), install the TCL/TK, Perl packages during the installation of linux...)

Common errors

While installing ns2, sometimes we get errors some of them are mentioned below (as keywords used to search). Apart from these errors there are many other types of errors also which occurs.

  • tcl8.4.18 make failed! exiting…
  • tk8.4.18 make failed!
  • make: *** [tk3d.o] error 1 tk8.4.18 make
  • tk8.4.18 make fail

Here are some steps and precautions to install ns2 in one shot.

  1. Always install your linux distro with full programming support, this will help you to install ns2 more easily, here programming support means support for perl, tcl, gcc etc.
  2. Also install this packages

    install autoconf

    install automake

    install gcc-c++

    install libX11-devel

    install xorg-x11-proto-devel

    install libXt-devel

    install libXmu-devel

Now try installing ns2, hope it should get install properly

5) Once the installation succeeded, then the path information will be provided by the NS2

6) Set the path in the /root/.bash_profile
(vi /root/.bash_profile)

If you are a user home//.bash_profile (for example, if your the username is tsp, then execute this command vi /home/tsp/.bash_profile)
7) set the PATH and the LD_LIBRARY_PATH according to the point number 11.

8) logout and login.

9) go to the terminal and try ns or nam

Spread Firefox Affiliate Button | edit post .

1 Comment

  1. Anonymous Says,

    where is point number 11 dude


Post a Comment

Are You Planning on Quitting Facebook? Why?



About Me

My Photo
Shashank Krishna
Bangalore, up, India
nothin much to say.........doin B.tech in IIIT allahabad loves bloggingn hacking.... :) and loooves blogging
View my complete profile