首页 > 代码库 > CentOS -bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8)

CentOS -bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8)

centos5.x 登陆显示:

-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


亲测

vi /etc/environment

写入

LANG=en_US.UTF-8

即可


CentOS -bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8)