Users experiencing locale problems on Ubuntu operating systems may encounter issues during the installation of software like PostgreSQL that requires locale settings.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = “en_US:en”,
LC_ALL = (unset),
…
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_ALL to default locale: No such file or directoryTo solve this problem, add the export commands below to your bashrc or zshrc file. To apply without closing the SSH session, run the same commands directly in SSH once. However, adding them to bashrc or zshrc is important for the changes to persist.
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8Since bashrc is commonly used, running the following commands directly via SSH will be sufficient:
echo “export LC_CTYPE=en_US.UTF-8” >> ~/.bashrc
echo “export LC_ALL=en_US.UTF-8” >> ~/.bashrcIf you are using zsh, replace ~/.bashrc with ~/.zshrc in the commands above.
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!