Fix: perl: warning: Setting locale failed

If you use OS X you can disover strange issue while connecting other machines through SSH (ex. Ubuntu Servers). It’s information about problems with load locales: perl: warning: Setting locale failed. It isn’t your server fault, but OS X default settings used in user session and profile. You can easily fix that issue editing profile file or for example ZSH config file.

Just edit ~/.profile and add that lines on the end:

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

After that close terminal and open it again (ZSH) or just re-login to system. You can of course use other locales, specific to your system language and region settings.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.