时间:2023-02-24来源:系统屋作者:zhijie
Ubuntu修改Locale的目的就是更改Linux系统的语言环境,但是Ubuntu修改Locale经常出现一个错误,导致出现中文乱码等一系列的问题。本文就来介绍一下Ubuntu系统修改Locale过程出现错误怎么解决?
问题描述
终端显示中文正常,应用程序里面显示中文异常。
错误表现
1$ sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = “zh_CN:zh:en_US:en”,
LC_ALL = “zh_CN.UTF-8”,
LANG = “zh_CN.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”)。
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
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)
Generating locales.。。
en_US.UTF-8.。。 /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)
up-to-date
Generation complete.
1$ man locale
man: can‘t set the locale; make sure $LC_* and $LANG are correct
1$ 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=zh_CN.UTF-8
LANGUAGE=zh_CN:zh:en_US:en
LC_CTYPE=“zh_CN.UTF-8”
LC_NUMERIC=“zh_CN.UTF-8”
LC_TIME=“zh_CN.UTF-8”
LC_COLLATE=“zh_CN.UTF-8”
LC_MONETARY=“zh_CN.UTF-8”
LC_MESSAGES=“zh_CN.UTF-8”
LC_PAPER=“zh_CN.UTF-8”
LC_NAME=“zh_CN.UTF-8”
LC_ADDRESS=“zh_CN.UTF-8”
LC_TELEPHONE=“zh_CN.UTF-8”
LC_MEASUREMENT=“zh_CN.UTF-8”
LC_IDENTIFICATION=“zh_CN.UTF-8”
LC_ALL=
1$ localectl list-locales
C.UTF-8
en_US.utf8
zh_CN.utf8
2023-02-23
Linux系统常用磁盘阵列介绍2023-02-23
CentOS系统安装JDK8的步骤2023-02-23
如何给Ubuntu系统安装Guake终端在Linux系统中dd命令是非常实用的,可以对文件进行复制的命令。而且dd命令再复制文件的同时,还能对文件进行转换。本文就来分析一下Linux系统dd命令的简单说明。...
2023-02-22
Debian系统虽然在国内用得比较少,但是在国外是非常流行的。其实Debian的用途非常广泛。只要配置过关,用户甚至可以在机顶盒中刷入Debian系统。那么如何在机顶盒中刷入原生的Debian系统呢?一起来看一下。...
2023-02-22