To install the AVR toolchain on Ubuntu 10.04 do the following:
sudo apt-get install gcc-avr binutils-avr gdb-avr avr-libc avrdude