mongodump失败"locale :: facet :: _ S_create_c_locale名称无效" [英] mongodump failure 'locale::facet::_S_create_c_locale name not valid'

查看:109
本文介绍了mongodump失败"locale :: facet :: _ S_create_c_locale名称无效"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用创建一个mongodb转储时

When I try to create a mongodb dump with

$ mongodump -d mydb

失败

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

我有LC_ALL=en_US,Ubuntu 10.0.4,MongoDB 2.4.6 我怀疑我的语言环境出了点问题,但是找不到确切的地方.

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

推荐答案

我今天遇到了同一问题.这与MongoDB无关.它与语言环境/语言有关.某种程度上,您的计算机上的语言未正确定义.我设法通过输入以下内容解决了我的问题:

I run into the same issue today. It's not strictly MongoDB related. It's locale/language related. Somehow the language on your computer is not defined correctly. I managed to fix my problem by typing:

sudo locale-gen en_US en_US.UTF-8
sudo locale-gen xx_XX xx_XX.UTF-8
sudo dpkg-重新配置语言环境

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

这些命令用于生成和配置所需的语言环境. 完成这些步骤后,一切都会按预期进行.

These commands are to generate and configure the needed locales. After those steps everything should work as expected.

这篇关于mongodump失败"locale :: facet :: _ S_create_c_locale名称无效"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆