mongodb安装 - 错误 - chown:无效组:'mongodb:mongodb'

时间:2017-03-16 03:36:08

标签: mongodb ubuntu-14.04

我正在尝试按照mongodb手册here的说明在ubuntu 14.10上安装mongodb。但是我收到了错误chown: invalid group: ‘mongodb:mongodb’,无法继续进行此操作。

> sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
  mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 56 not upgraded.
..................................
..................................

Setting up mongodb-org-shell (3.4.2) ...
Setting up mongodb-org-server (3.4.2) ...
chown: invalid group: ‘mongodb:mongodb’
dpkg: error processing package mongodb-org-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up mongodb-org-mongos (3.4.2) ...
Setting up mongodb-org-tools (3.4.2) ...
dpkg: dependency problems prevent configuration of mongodb-org:
 mongodb-org depends on mongodb-org-server; however:
  Package mongodb-org-server is not configured yet.

dpkg: error processing package mongodb-org (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mongodb-org-server
 mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
>

1 个答案:

答案 0 :(得分:1)

请遵循此命令,我希望,这对您有帮助。

sudo userdel -r mongodb

sudo groupdel mongodb

sudo adduser mongodb

sudo groupadd mongodb

useradd -G mongodb mongodb