Installing NS2

Alan Pope alan at
Thu Sep 22 11:02:03 UTC 2011

On 22 September 2011 11:41, Leila M <mech.loulou at> wrote:
> actually I need to compile it myself because after the installation of NS2 I
> will need to make some changes to some of the NS2 files (it's a question of
> adding a new agent...) which is not possible if I used the packaged version
> from the archive.

You could get the source from the archive which is clearly known to build.

# get the build tools
sudo apt-get install devscripts build-essential

# get the source
apt-get source ns2

# get the build dependencies
sudo apt-get build-dep ns2

# test that you can build it
debuild -b -uc -us

Time passes....

$ ls -l ../*.deb
-rw-r--r-- 1 alan alan  5187246 2011-09-22 11:59
-rw-r--r-- 1 alan alan  2036074 2011-09-22 11:59
-rw-r--r-- 1 alan alan 41471474 2011-09-22 11:59


A binary of ns2 built on my own machine. Now you can add whatever
patches you want to it and build it again (with debuild). The benefit
here is that you can install those deb files and if they don't work
you can just remove them and install your newly built ones.

End to end this whole thing (including compiling on a core i7) took no
more than 10 minutes.


More information about the ubuntu-users mailing list