MongoDB:locale :: facet :: _ S_create_c_locale名称无效

Osa*_*awe 26 ubuntu locale mongodb

尝试启动时收到此错误消息mongod:

Tue Oct 29 21:33:23.589 [initandlisten] exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid, terminating
Run Code Online (Sandbox Code Playgroud)

我试过删除它并重新安装,但我得到了同样的错误.

我能做什么?

joe*_*ews 73

错误消息: locale::facet::_S_create_c_locale name not valid表示mongod无法使用操作系统的当前区域设置.

调整您的语言环境C,Mongo支持,将解决问题:

export LC_ALL=C
mongod 
Run Code Online (Sandbox Code Playgroud)

但是,这不是一个完美的解决方案:LC_ALL=C强制按字节顺序排序,而不是区分区域敏感的字符排序,

通常缺少MongoDB语言环境支持.有一个开放的JIRA票,讨论语言环境支持.

  • 大!将LC_ALL设置为C解决了我的问题=).那是做什么的? (3认同)