【问题标题】:Why is MongoDB unable to create a user on Ubuntu 11.10 when installing?为什么MongoDB在安装时无法在Ubuntu 11.10上创建用户?
【发布时间】:2012-04-14 18:43:25
【问题描述】:

我正在我的 Ubuntu 11.10 机器上安装 MongoDB。将适当的行添加到 /etc/apt/sources.list 后(使用来自 here 的说明),我键入以下内容进行安装:

sudo apt-get install mongodb-10gen

结果如下:

Adding system user `mongodb' (UID 117) ...
Adding new user `mongodb' (UID 117) with group `nogroup' ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /home/mongodb -g nogroup -s /bin/false -u 117 mongodb' returned error code 1. Exiting.
dpkg: error processing mongodb-10gen (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)

我只打开了其他终端窗口(它们都没有运行任何程序)和 Chromium 打开。为什么安装可能无法添加用户?

谢谢,

ParagonRG

【问题讨论】:

标签: linux mongodb ubuntu installation


【解决方案1】:

解决方案,感谢来自this resource 的“Thomas”:

查找 /etc/group.lock、/etc/passwd.lock 和 /etc/shadow.lock,然后删除它们。确保仅删除这些文件(如果它们存在)。

完成此操作后,我只需重新运行安装命令即可成功完成。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-12-11
    • 2011-12-19
    • 2012-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多