【mongdb报错】Failed global initialization: BadValue Invalid or no user locale set

[root@node1 ~]# mongo

Failed global initialization: BadValue Invalid or no user locale set.  Please ensure LANG and/or LC_* environment variables are set correctly. locale::facet::_S_create_c_locale name not valid


翻译:全球初始化失败:BadValue无效或没有用户语言环境设置。请确保LANG and/or LC_* 正确设置环境变量

解决方案:

手动设置变量,在命令行里敲只是临时的重启后没有用了,这需要在环境变量配置文件里添加一行。

# vim /etc/profile

export LC_ALL=C

保存退出后, source /etc/profile. 

再重新启动 mongo即可.

猜你喜欢

转载自blog.csdn.net/zhangyingchengqi/article/details/106742011
今日推荐