I managed to shoot myself in the foot attempting to install geany on Ubunto Dapper. It broke the libc6-dev and a couple of associated libs. After several futile attempts to fix it with apt-get followed by a few futile attempts with Synaptics package manager, I found this with google. It worked so well I thought I would share it.
Grab your install cd, open a terminal and:
sudo apt-cdrom add '<------ This mounts the cd rom
sudo aptitude install build-essential '<------- this performs the magic
I tested it using fbc hello.bas. The compile failed -- ncurses lib not found, which I restored with apt-get install ...
It worked.
It is past my bedtime.
Scott