LC_CTYPE 在 linux 下的报错问题

warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
更新于: 2022-04-21 14:23:18

问题

On a freshly installed CentOS 7 machine, I got the following notice when I SSH’d into the server.

添加变量到 .bashrc

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"

vim /etc/environment

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

参考