Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB: locale::facet::_S_create_c_locale name not valid

I got this error message when trying to start mongod:

Tue Oct 29 21:33:23.589 [initandlisten] exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid, terminating

I have tried remove it and re-installing, but I got the same error.

What can I do?

like image 831
Osama Jetawe Avatar asked Oct 29 '13 20:10

Osama Jetawe


1 Answers

The error message: locale::facet::_S_create_c_locale name not valid indicates that mongod is unable to work with your operating system's current locale.

Adjusting your locale to C, which is supported by Mongo, will fix the problem:

export LC_ALL=C
mongod 

This isn't a perfect solution, however: LC_ALL=C forces sorted by byte order rather than locale-sensitive character ordering,

MongoDB locale support is generally lacking. There is an open JIRA ticket discussing locale support.

like image 111
joews Avatar answered Nov 04 '22 05:11

joews