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?
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.