无法在 ubuntu 13.04 上安装 mongodb

无法在 ubuntu 13.04 上安装 mongodb

我执行了导入公钥的前两个步骤,方法是:

prachi@prachi-3000-N100:~$  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
[sudo] password for prachi: 
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.z5S9qmVca3 --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
gpg: key 7F0CEB10: "Richard Kreuter <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

然后第二步是列出 mongo 的文件;

prachi@prachi-3000-N100:~$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

然后在第三步,即重新加载存储库时,显示此错误:

prachi@prachi-3000-N100:~$ sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

出了什么问题??请帮忙

答案1

您拥有另一个可能正在运行或已终止的 apt-get 进程的锁。

检查是否有任何正在运行

ps aux | grep apt

如果什么都没有运行,请移除可能存在的锁

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock

相关内容