⑴Ubuntu修改Locale的目的就是更改Linux系统的语言环境,但是Ubuntu修改Locale经常出现一个错误,导致出现中文乱码等一系列的问题。本文就来介绍一下Ubuntu系统修改Locale过程出现错误怎么解决?
⑵终端显示中文正常,应用程序里面显示中文异常。
⑶$ sudo dpkg-reconfigure locales
⑷perl: warning: Setting locale failed.
⑸perl: warning: Please check that your locale settings:
⑹LANGUAGE = “zh_:zh:en_US:en”,
⑺LC_ALL = “zh_.UTF-”,
⑻LANG = “zh_.UTF-”
⑼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_.UTF-
⒂Generating locales.。。
⒃en_US.UTF-.。。 /usr/sbin/locale-gen: line : warning: setlocale: LC_ALL: cannot change locale (zh_.UTF-
⒄up-to-date
⒅Generation plete.
⒆$ man locale
⒇man: can‘t set the locale; make sure $LC_* and $LANG are correct
⒈$ 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_.UTF-
⒍LANGUAGE=zh_:zh:en_US:en
⒎LC_CTYPE=“zh_.UTF-”
⒏LC_NUMERIC=“zh_.UTF-”
⒐LC_TIME=“zh_.UTF-”
⒑LC_COLLATE=“zh_.UTF-”
⒒LC_MOARY=“zh_.UTF-”
⒓LC_MESSAGES=“zh_.UTF-”
⒔LC_PAPER=“zh_.UTF-”
⒕LC_NAME=“zh_.UTF-”
⒖LC_ADDRESS=“zh_.UTF-”
⒗LC_TELEPHONE=“zh_.UTF-”
⒘LC_MEASUREMENT=“zh_.UTF-”
⒙LC_IDENTIFICATION=“zh_.UTF-”
⒚$ localectl list-locales
⒛en_US.utf
①zh_.utf