ssh登錄locale報錯:cannot change locale (zh_CN.UTF-8): No such file or directory


一、登錄ssh報錯:

Last login: Tue Apr 23 03:42:01 2019 from 172.28.146.109
-bash: warning: setlocale: LC_ALL: cannot change locale (en_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_ALL: cannot change locale (en_CN.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)

二、編輯/etc/profile文件

vim /etc/profile

末尾加上:

export LC_ALL=C

生效

source /etc/profile

重新登錄ssh即可。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM