cd /var/cache/apt mv archives /home/ ln -s /home/archives/ archives
add the repo deb http://repository.maemo.org fremantle/sdk free non-free Code: apt-get update apt-get install build-essential then remove the repo again and apt-get update once again.
apt-get update apt-get install build-essential