CentOS 7 fix for “perl: warning: Please check that your locale settings are supported and installed on your system.”
Date: December 4, 2018
Categories: bash, CentOS / RHEL
Issue:
Logging in via SSH you are greeted with:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “en_US.UTF-8”,
LANG = “C.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
Solution:
Edit /etc/environment and add the following. Replace en_US with your actual locale if you are not using en_US:
LC_ALL="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LANGUAGE="en_US.UTF-8"
How to check actual locale on the server
[…] to this page, you can just add the following […]
Thank you very much for your help
nice! Thank you!
Perfect. After creating /etc/environment file with your suggestion, no more messages when I connect.
Absolutely failed for me, even after a reboot. Buffaloed.
I had to fix this once before, a long while ago, on CentOS 6, but forgot how I did it, and my notes were wiped in the upgrade (D’oh!).
Continuing my search…
Figured out the problem. Variables have to be set on the ssh client side, not the ssh server (CentOS) side.
Awesome!
Thanks man!
Worked for my on my new Hostgator’s VPS. (centOS 7)
thanks for solution bro