menu E4b9a6's blog
rss_feed
E4b9a6's blog
有善始者实繁,能克终者盖寡。

Debian10错误Setting locale failed

作者:E4b9a6, 创建:2024-08-16, 字数:616, 已阅:121, 最后更新:2024-08-16

在Debian10中使用 apt 时遇到 Setting locale failed 错误

这个错误信息说明系统的区域设置(locale)配置有问题,需要进行调整

首先安装locales

Bash
sudo apt-get update
sudo apt-get install locales
sudo dpkg-reconfigure locales

在 dpkg-reconfigure locales 过程中,确保选择以下区域设置:

  • en_US.UTF-8 UTF-8
  • zh_CN.UTF-8 UTF-8

编辑文件: /etc/default/locale

TEXT
LANG=en_US.UTF-8
LC_TIME=zh_CN.UTF-8
LC_MONETARY=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHONE=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION=zh_CN.UTF-8
LC_NUMERIC=zh_CN.UTF-8
LC_PAPER=zh_CN.UTF-8

重新加载 locales 就可以解决这个问题了

Bash
source /etc/default/locale

[[replyMessage== null?"发表评论":"发表评论 @ " + replyMessage.m_author]]

account_circle
email
web_asset
textsms

评论列表([[messageResponse.total]])

还没有可以显示的留言...
gravatar
[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[getEnviron(messageItem.m_environ)]]