To install ns-2.34 on Ubuntu 9.10, install the development files for X Windows plus the g++ compiler:
sudo apt-get install xlibs-static-dev xorg-dev g++ xgraph

Advertisements