This is usually a directory permissions issue with the tmp folder.
When installing extensions, the tmp folder is used by the extensions installer, to extract the uploaded archived file. Therefore, the folder needs to exist and be writable.
A good place to find out if your Joomla folders are writable is by checking in the:
System Information -> Directory Permissions.
- In Joomla 2.5 is under the Site Menu item.
- in Joomla 3- under the System menu item.
Generally, directory permissions issues can occur either by the actual permissions on a given folder, which can be wrong owner or read/write values, or if a specified directory doesn't exist at all.
For the tmp folder, make sure that there is the correct path folder defined in Joomla Configuration.
In cPanel hosting this usually is something like: