A weird issue encountered while trying to run laravel’s php artisan commands while logged in using SSH. Following was the error.
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
After bit of research it turned out that it was not related to laravel at all. The issue was that i was trying to connect to an older host/OS (centos – cPanel) from a newer machine (macOS 10.15.1 in my case).
Adding following in .bash_profile in macOS solved it for me.
# Setting for the new UTF-8 terminal support in Lion export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8
For more details check this