Mongodump failure 'locale :: facet :: _ S_create_c_locale name is invalid'

When I try to dump mongodb with

$ mongodump -d mydb 

he fails

 terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted 

I have LC_ALL=en_US , Ubuntu 10.0.4, MongoDB 2.4.6 I suspect that something is wrong with my locale, but can not find what it is.

+4
source share
1 answer

Today I am facing the same question. This is not strictly MongoDB. This is the language / language. Somehow the language on your computer is not defined correctly. I managed to fix my problem by typing:

sudo locale-gen en_US ru_US.UTF-8
sudo locale-gen xx_XX xx_XX.UTF-8
sudo dpkg-reconfigure locales

These commands are designed to create and configure the necessary locales. After these steps, everything should work properly.

+4
source

All Articles