Are you using a file cache? Memcache? or some other caching system?
Apparently the clearing of the cache from the admin panel doesn't work on all cache systems.
If you are using a file cache, and still getting this error, I would check the permissions first... You might have permissions to do this in FTP, but the user that Apache/PHP is running when hosting your site...might not.
If all else fails, and you are using file cache, you can always remove the cache clearing requirement from the module, then clear it manually both before and after installing the mod. (recommended only as a temporary solution)