问题描述
我在Google Compute Engine上创建了一个linux debian实例。
I created a instance of linux debian on Google Compute Engine.
我安装git,node.js,python和其他一些没有问题的东西
I Install git, node.js, python and some other things without problems
但是当我安装mongodb ,完成安装并安装后尝试运行mongod,说:
[FAIL]启动数据库:mongod失败!
But when I install mongodb, when finish the installation and the installation try to run mongod, said:[FAIL] Starting database: mongod failed!
我尝试:sudo服务mongod启动和是一样的。
I try with: sudo service mongod start and was the same.
我尝试很多东西,如:
rm mongodb.lock
rm mongodb.lock
将数据路径更改为/ data / db
将更改权限转换为mongodb.log
Change path of data to / data / dbChange permisions to mongodb.log
但没有任何工作。
当我运行/etc/init.d/mongod开始
When I run /etc/init.d/mongod start
错误是:
start-stop-daemon:到9月gid到65534(操作不允许)
失败!
The error is:start-stop-daemon: unable to September gid to 65534 (Operation not permitted) failed!
任何想法可能是错误?
mongodb.log是空的,所以我可以粘贴在这里详细的结果。
The mongodb.log is empty so, I can paste here the results of verbose.
谢谢
推荐答案
这种错误登录在mongodb-org的apt-get日志中:
If you are seeing this kind of error log in the apt-get log of mongodb-org:
Package mongodb-org-server is not configured yet.
这可能与GCE debian图像错误与locale有关
This maybe related to the GCE debian image bug with the localehttps://github.com/andsens/bootstrap-vz/issues/49
所以一个这样做的方法是:
So a way around this is to do:
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
dpkg-reconfigure命令将打开一个对话框,用于选择需要的语言环境。只需选择生成全部,然后选择e_US.UTF-8
The dpkg-reconfigure command will open a dialog for selecting the desires locales. Just select generate all, then choose e_US.UTF-8
然后,您可以按照以下步骤操作:
Then you can follow the steps in :
你以前可能已经做过了。
As you have probably have done before.
今天在gce debian-7图片中为我工作了。
This worked for me in gce debian-7 image today.
这篇关于服务mongod启动debian无法工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!