Fix error: Failed to move file! when installation extension in joomla 3.x

When installation any joomla extension , you get error:
Warning: Fail to move file! like image below: Fail-to-move-file This error correlative to tmp folder in Joomla 3.x.
Tmp Folder safe to assume that this temporary folder is used for miscellaneous purposes, and the files stored in this folder are most likely deleted or moved to a more permanent location almost immediately after being put in the tmp folder.
The tmp folder is defined in file configuration.php at line: We scanned all the files in Joomla that reference the temp folder, and it appears that in most cases, the tmp folder is used to extract compressed files. For example, if you upload a component in a .zip format, Joomla will use the tmp folder to first unzip the contents of the file.
Now we will fix error above by:
Login as admin, chose  System-> Global Configuration-> Server-> Path to Temp Folder, enter the full path to your tmp folder and then click the Save button in the top left of the page.
By default it will be set to (path/to/joomla)/tmp . If the new temp folder does not exist, Joomla 3.0 will attempt to create it the next time it needs it.