码迷,mamicode.com
首页 > 其他好文 > 详细

Debian下Cannot set LC_CTYPE to default locale: No such file or directory解决方法

时间:2019-04-12 12:01:27      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:san   tom   nan   link   ack   add   csdn   border   方法   

把语言环境变量改为英文

将Ubuntu系统语言环境改为英文的en_US.UTF-8

查看当前系统语言环境

locale

编辑配置文件,将zh_US.UTF-8改为en_US.UTF-8,zh改为en

sudo nano /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"

继续查看更改后的系统语言变量,假设出现下列错误。说明没安装en_US的local

qii@ubuntu:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

查看系统内安装的locale

qii@ubuntu:~$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
zh_CN.utf8
zh_SG.utf8

看吧。没装en_US.UTF-8

安装en_US.UTF-8

sudo locale-gen en_US.UTF-8

再次查看,应该一切正常了。

qii@ubuntu:/usr/share/locales$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Debian下Cannot set LC_CTYPE to default locale: No such file or directory解决方法

标签:san   tom   nan   link   ack   add   csdn   border   方法   

原文地址:https://www.cnblogs.com/mqxnongmin/p/10694981.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
分享档案
周排行
mamicode.com排行更多图片
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!