warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or dire...
source link: https://ma.ttias.be/warning-setlocale-lc_ctype-cannot-change-locale-utf-8-no-such-file-or-directory/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
Mattias Geniar, October 21, 2019
Follow me on Twitter as @mattiasgeniar
On a freshly installed CentOS 7 machine, I got the following notice when I SSH’d into the server.
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
The fix is pretty straight-forward. On the server (not your client), edit the file /etc/environment
and add the following lines.
(You’ll need root privileges to do this)
$ cat /etc/environment LANG=en_US.utf-8 LC_ALL=en_US.utf-8
Log out & back in and you should notice the warning message is gone.
Want to subscribe to the cron.weekly newsletter?
I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.
It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.
No spam. Just some good, practical Linux & open source content.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK