在 Mac 上安装 R - 警告消息:设置 LC_CTYPE 失败,使用“C"; [英] Installing R on Mac - Warning messages: Setting LC_CTYPE failed, using "C"

查看:69
本文介绍了在 Mac 上安装 R - 警告消息:设置 LC_CTYPE 失败,使用“C";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的笔记本电脑 Mac OS X 版本 10.7.3 上安装 R

I would like install R on my laptop Mac OS X version 10.7.3

我下载了最新版本并双击它并安装了它,当我启动时出现以下错误,我在互联网上搜索但我无法解决问题,任何帮助将不胜感激

I downloaded the last version and I double click on it and it was installed, when i start up I get the following error, I searched in internet but I could not solve the problem, any help would be appreciated

错误是

启动期间 - 警告消息:
1:设置LC_CTYPE失败,使用C"
2:设置LC_COLLATE失败,使用C"
3:设置LC_TIME失败,使用C"
4:设置LC_MESSAGES失败,使用C"
5:设置LC_PAPER失败,使用C"
[R.app GUI 1.50 (6126) x86_64-apple-darwin9.8.0]

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_PAPER failed, using "C"
[R.app GUI 1.50 (6126) x86_64-apple-darwin9.8.0]

警告:您使用的是非 UTF8 语言环境,因此只能使用 ASCII 字符.请阅读 R for Mac OS X FAQ(请参阅帮助)第 9 部分并相应地调整您的系统首选项.[从/Users/nemo/.Rapp.history恢复的历史]

WARNING: You're using a non-UTF8 locale, therefore only ASCII characters will work. Please read R for Mac OS X FAQ (see Help) section 9 and adjust your system preferences accordingly. [History restored from /Users/nemo/.Rapp.history]

推荐答案

  1. 打开终端
  2. 写入或粘贴:defaults write org.R-project.R force.LANG en_US.UTF-8
  3. 关闭终端(包括任何 RStudio 窗口)
  4. 开始 R


如果有人在 docker 环境中(在 root 下)运行 R,请尝试使用以下命令运行 R,


For someone runs R in a docker environment (under root), try to run R with below command,

LC_ALL=C.UTF-8 R
# instead of just `R`

这篇关于在 Mac 上安装 R - 警告消息:设置 LC_CTYPE 失败,使用“C";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆