Setup script exited with error: command ‘gcc’ failed with exit status 1

I was getting this error when I was installing Plone 4a1 from terminal. after one day search i found this

sudo apt-get install python-dev

will do the trick.