4
2
I'm trying to install packages in R using Mac OS X, but I keep getting tar: Failed to set default locale
errors for any package I try. After Googling around I found that this was due to unexpected locale settings. I set them back to en_US.UTF-8
as recommended elsewhere, but still can't install packages. When I run locale
in Terminal, I get:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
But when I run system("locale")
in R I get:
LANG="en_US.UTF-8"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"
I do remember setting some locale settings to "C" awhile ago, for some other purpose, but forget where now.
This does not answer the author's question. – Ramhound – 2017-02-09T15:52:21.493
Actually id does. I just had the same problem and just changing default locale wasn't helping. Then I realized that in one of dozens modules in my script I had Sys.setenv function which rewrited default settings. – Johnny Cheesecutter – 2017-02-09T16:31:20.457