3

I bought a VPS, Centos 7.

However, I was able to understand what was going on with SSH and connected to my WHM.

After connecting, I get a list of errors and there is something like this:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

My system is the latest MacOS Mojave.

UPDATE: Finally it worked :) It was enough in the terminal in my system to enter these two commands.

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

The server is from the US, so I think that's why I had to set the language. The problem is now that if I turn off the terminal and turn it on again, I have to do the export command again. But it's already better than it was, I'm looking further ... :)

UPDATE 2:

I had to add these 2 lines, but to the file ~ / .bash_profile, now everything works even after the terminal is restarted.

  • 1
    are you executing a Perl script intentionally, or as a part of your login? It would help see that Perl script. – Jeff Schaller Mar 6 at 17:36
  • The locale-related environment variables seems to be set incorrectly. You can remedy this by setting them correctly. Setting LC_ALL to the single character C or the string POSIX is a safe thing to do. You may also want to investigate your shell startup files to see if any LC_* variables are set in there, or at least set LC_CTYPE to C as well. – Kusalananda Mar 6 at 17:44
  • @JeffSchaller - These errors appear immediately when I connect to the server. The only thing I write in the command is ssh root @ myip. – Maciej Mar 6 at 17:53
  • @Kusalananda - I found that in the system it can be changed eg in the / etc / environment file. I gave there something like LANG = C and LC_ALL = C, unfortunately it did not help. – Maciej Mar 6 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.