setlocale LC CTYPE cannot change locale utf8 on MacOS.
Lỗi “warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory” thường xuất hiện trên MacOS khi truy cập server bằng ssh.
Khắc phục:
Mở Terminal, chạy lệnh vi:
$ sudo vi /etc/ssh/ssh_config
Nhập password cho người dùng root.
Tìm kí tự SendEnv gõ /SendEnv
rồi nhấn Enter. Bấm kí tự “i” để chuyển sang chế độ Insert.
Comment dòng : #SendEnv LANG LC_*
Nhấn ESC thoát chế độ Insert. Bấm :wp để lưu file.
Test lại: