我称为许多链接来解决这个错误SEVERE: Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.
(泊坞使用“--net =宿主”启动)。无法通过ssh ubuntu的搬运工容器内运行的mongod
我执行export LC_ALL=C
如告诉记者,在下面的链接
https://askubuntu.com/questions/536875/error-in-installing-mongo-in-virtual-machine
,做下面的步骤,
[email protected]:/# localedef -i en_US -f UTF-8 en_US.UTF-8
[email protected]:/# export LANGUAGE=en_US.UTF-8
[email protected]:/# export LANG=en_US.UTF-8
[email protected]:/# export LC_ALL=en_US.UTF-8
[email protected]:/# locale-gen en_US.UTF-8
Generating locales...
en_US.UTF-8... done
Generation complete.
[email protected]:/# dpkg-reconfigure locales
Generating locales...
en_US.UTF-8... up-to-date
Generation complete.
尝试所有上述步骤还我仍然得到下面的错误,当我通过ssh
[email protected]:~/docker$ sshpass -p password ssh [email protected] 'mongod --dbpath /var/lib/mongodb/ &'
2015-02-24T09:50:27.158+0000 SEVERE: Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.
执行蒙戈的命令,但是当我从它的工作原理容器内执行mongod --dbpath /var/lib/mongodb/ &
,下面是终端输出后
[email protected]:/# mongod --dbpath /var/lib/mongodb/ &
[1] 284
[email protected]:/# 2015-02-24T09:56:42.108+0000 [initandlisten] MongoDB starting : pid=284 port=27017 dbpath=/var/lib/mongodb/ 64-bit host=product
2015-02-24T09:56:42.108+0000 [initandlisten] db version v2.6.7
2015-02-24T09:56:42.108+0000 [initandlisten] git version: a7d57ad27c382de82e9cb93bf983a80fd9ac9899
2015-02-24T09:56:42.108+0000 [initandlisten] build info: Linux build7.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-02-24T09:56:42.108+0000 [initandlisten] allocator: tcmalloc
2015-02-24T09:56:42.108+0000 [initandlisten] options: { storage: { dbPath: "/var/lib/mongodb/" } }
如果有人知道为什么发生这种情况,我想通过ssh来运行它。
你可以从后'sshpass -p密码SSH [email protected]“回声$ LANGUAGE”个结果' – user2915097 2015-02-24 10:37:45
空行,当我运行命令我得到的响应。这是我跑什么= “产品@产品:〜/泊坞窗$ sshpass -p密码SSH [email protected] '回声$ LANGUAGE'” – 2015-02-24 10:40:55