With a normal install of Ubuntu 5.10, I also needed to install automake and the freetype library to compile Stellarium.