Missing /usr/local/avr

You TRIED to reinstall the packages? What happened? That's what you need to do if you accidentally deleted a file.

try:

sudo apt-get --reinstall install gcc-avr

If stdlib.h is missing, you may have to reinstall avr-libc as well.