This issue arise only in two cases.
1) You are creating any custom module in magento.
2) Your compiler having same issue.
In your case you are facing issue with default magento extension installation. So it should be second option. Here is solution for second case.
From System, Tools disable or re-compile Compilation. If you can't access to admin interface you can disable it by SSH:
php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear
php -f shell/compiler.php -- state
The final output should appear like:
Compiler Status: Disabled
Compilation State: Not Compiled
Collected Files Count: 0
Compiled Scopes Count: 0
For First case, you will surely get help from here.