When you call “mongo” and found this message.
$ mongo Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.
You can fix by, At the command prompt:
and then try again. If that doesn’t work, you may need to edit:
sudo vi /etc/default/locale
LANG= LANGUAGE= LC_ALL=
to your preferred settings. As an example:
LANG=en_US.UTF-8 LANGUAGE=en_US LC_ALL=en_US.UTF-8