[MongoDB] Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.

Tadashi Shigeoka ·  Mon, February 16, 2015

An error occurred when trying to enter mongo shell.

$ mongo myDb
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.

MongoDB | モンゴディービー

For now, you can connect to mongo shell by using the default locale.

$ export LC_ALL=C

Also, according to the article below, uninstalling unnecessary mongo packages should resolve the issue.

[MongoDB] Notes when changing from mongo 2.6.5 to 2.6.4 because too many errors occurred on CentOS6.4 - Qiita

Reference Information

That’s all from the Gemba.