首页 > 系统 > Linux教程

Ubuntu系统修改Locale时出现错误怎么解决?

  Ubuntu修改Locale的目的就是更改Linux系统的语言环境,但是Ubuntu修改Locale经常出现一个错误,导致出现中文乱码等一系列的问题。本文就来介绍一下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

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
本文地址:/jtjc/Linux/2021-03-08/26805.html

留言与评论(共有 0 条评论)
   
验证码:

潘少俊衡

| 桂ICP备2023010378号-4

Powered By EmpireCMS

爱享小站

中德益农

谷姐神农

环亚肥料

使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

感谢潘少俊衡友情技术支持