I recently encountered a problem when logging through SSH in to certain servers that I use for work when using my new Macbook Pro (running Lion 10.9.2).
So right after the login was completed I was getting the following message:
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
It only happened on certain servers, for others everything would work just fine.
This caused a few problems when running some perl scripts that would complain about the locale variables not being set, even though my Terminal app was setup correctly.
To fix this I simply added the following to my ~/.bash_profile:
export LC_CTYPE="en_US.UTF-8"
Let me know if that helped you by leaving a comment below!
本文解决在使用Macbook Pro运行Lion 10.9.2系统时,通过SSH登录特定服务器时出现的locale设置错误问题。通过在~/.bash_profile中添加设置LC_CTYPE为en_US.UTF-8的命令,成功解决了Perl脚本运行时的locale变量未正确设置的问题。
1329

被折叠的 条评论
为什么被折叠?



