This may be caused by Joomla hitting the maximum upload file size settings in php.ini, which is the configuration file for PHP settings. By default this can be as low as 2MB and easy to hit. I encountered this error while trying to install the VirtueMart component which is over 2MB in size.
The best way to determine your php.ini settings is through the Joomla Administration interface through the Help > System Info menu and then by clicking on the PHP Information link.

Joomla System Information - PHP Information
Search the information display for the value upload_max_filesize. Note that there are two columns shown – the first column is the local value (from the local php.ini file) and the second column is the master value (from the master php.ini file). If the value is only 2M then you will probably have issues.
There are a few ways to increase this setting. The option you use will depend on what access you have to your hosting:
Option 1: Edit the upload_max_filesize parameter directly in master php.ini. Simply change the value to something more appropriate, for example from 2M to 32M. Remember that this will be a global change. If you are on shared web hosting, you probably don’t have access to do this anyway.
Option 2: Specify the parameter in your .htaccess file if you are using PHP loaded as an Apache module. Do this in your Joomla administrator folder. The parameter looks like this:
php_value upload_max_filesize 32M.
Don’t rename the delivered htaccess.txt as this contains other directives. If this doesn’t work or you get the following error: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration then PHP is not loaded as an Apache module. Try the next option.
Option 3: Is to override settings in your master php.ini file with a local php.ini file in your Joomla administrator folder. To do this, copy the entire master php.ini. You can find the location of your master php.ini by looking at the Loaded COnfiguration File in the Joomla PHP Information page. Then edit the local php.ini file in your Joomla administrator folder and change the upload_max_filesize paramter accordingly. This is essentially the same as Option 1, but you will be using a local php.ini file which is specific to just your Joomla installation and doesn’t impact on anything else. Use the PHP Information page to confirm Joomla has loaded your local php.ini file and that the upload maximum file size parameter has been adjusted accordingly.