Docker进入容器报bash: warning: setlocale: LC_CTYP: cannot change locale (en_US.UTF-8):No such file or dir
实时报错
1 2 3 4 5 | 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 |
解决办法:
容器里执行如下代码: [不是宿主机执行如下代码]
1 | localedef -i en_US -f UTF-8 en_US.UTF-8 |