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

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


Step 1 (In R Console)

system('defaults write org.R-project.R force.LANG en_US.UTF-8')

Step 2: Restart R

Source: http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Internationalization-of-the-R_002eapp


Use this command in the R console:

system("defaults write org.R-project.R force.LANG en_US.UTF-8")

Remember to quit and start again R.


  • Better Close the entire R studio and Reopen it againwill fix that error tar: Failed to set default locale