Ubuntu: mongo Failed message about LANG

Linux 1 ก.ย. 2016

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:

export LC_ALL=C

and then try again. If that doesn’t work, you may need to edit:

sudo vi /etc/default/locale

and set

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

แท็ก

Onyx

Just a middle-aged programmer, Can do many things but not the most.