Unable to use drush dl. No such file or directory filesystem.inc:267 I'm trying to download Drupal 7 using Drush 8.1.2, without success. It was working perfectly for months; now, I am getting the following error message on all modules and core downloads when I'm running:

drush dl drupal-7



  copy(/tmp/drush_tmp_1468772300_578bafccc15f2/tar: Failed to set default locale): failed to open stream: No such file or directory filesystem.inc:267
  Project drupal (7.50) could not be downloaded to /Applications/MAMP/htdocs/drupal-7.50


I haven't changed any tmp permissions. What can I do?

I am using PHP 5.6.10 and Drush temporary directory is /tmp.
The error:


  Failed to set default locale


sounds like tar command invoked by Drush has some problem detecting your system locale.

Try setting it to UTF-8 by the following command:

defaults write org.R-project.R force.LANG en_US.UTF-8


Source: How to fix 'tar: Failed to set default locale' error?