2

I am getting the error message above when I open R.

When I attempt to download a package I am also given this error message:

tar: Failed to set default locale

Can anyone tell me how to set a UTF8 locale on R?

VMAtm
  • 27,943
  • 17
  • 79
  • 125
Holly
  • 21
  • 1
  • 2
  • 1
    I can't help, but I suspect you need to say what operating system you're on. – Ed Staub Sep 14 '11 at 20:12
  • And possibly where you are on the planet (or at least where your computer thinks you are). – joran Sep 14 '11 at 20:17
  • Please post the output of `Sys.getlocale()`. – adamleerich Sep 15 '11 at 01:20
  • Please see this answer http://stackoverflow.com/questions/3907719/r-fail-install-packagesncstats-http-www-rforge-net-tar-failed-to – adamleerich Sep 15 '11 at 01:26
  • http://stackoverflow.com/questions/9689104/installing-r-on-mac-warning-messages-setting-lc-ctype-failed-using-c this one gives the right answer Open Terminal Write or paste in: defaults write org.R-project.R force.LANG en_US.UTF-8 Close Terminal Start R – Vanjor Aug 18 '13 at 12:16

1 Answers1

1
tar: Failed to set default locale

This generally means the locale you have selected (through the LANG and LC_* environment variables is not available on your system).

How you add locales to your systems is distro dependent. On Debian systems you can use "dpkg-reconfigure locales". On Ubuntu I belive it's normally done by installing the corresponding "language pack" package. On other distros I have no idea.

Scransom
  • 3,175
  • 3
  • 31
  • 51
plugwash
  • 9,724
  • 2
  • 38
  • 51