9.04 (Jaunty) Graphics programs will require:sudo aptitude install libncurses5-dev libstdc++6-4.3-dev build-essential
7.10 (Gutsy) Console programs require:sudo aptitude install libX11-dev libXext-dev libXpm-dev libXrender-dev libXrandr-dev
7.10 (Gutsy) Graphics programs will require:sudo aptitude install binutils linux-libc-dev libncurses5-dev libstdc++6-4.1-dev build-essential
These package names may exist on older versions of Ubuntu or other Debian based distros.sudo aptitude install libX11-dev libXext-dev libXpm-dev libXrender-dev libXrandr-dev
If you are not on Gutsy and recieve compile time errors about missing -lsupc++ then you will need to run:
On most systems this is a virtual package provided by a couple other packages, you should choose the one with the same version as your copy of GCC, for example Gutsy uses GCC 4.1.3 and libstdc++6 is version 4.1.sudo aptitude install libstdc++6-dev