-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory

tee /etc/environment <<- 'EOF'

LANG=en_US.utf-8
LC_ALL=
EOF

source /etc/environment

/* 生成 en_US.UTF-8 locale文件 CentOS没有locale-gen命令*/

localedef -v -c -i en_US -f UTF-8 en_US.UTF-8

可以解决bash的格式问题

发表评论

您的电子邮箱地址不会被公开。

Captcha Code