在AmazonAWS中安装MongoDB时“缺少依赖关系:/ bin / sh”

时间:2014-04-28 14:39:30

标签: mongodb amazon-web-services amazon-ec2

我尝试按照THIS指南在AmazonAWS中安装MongoDB,但是当我运行此命令时:

sudo yum install -y mongo-10gen-server

我收到此消息:

ubuntu@ip-10-112-41-241:/bin$ sudo yum install -y mongo-10gen-server
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mongo-10gen-server.x86_64 0:2.4.10-mongodb_1 set to be updated
--> Processing Dependency: mongo-10gen for package: mongo-10gen-server-2.4.10-mongodb_1.x86_64
--> Processing Dependency: /bin/sh for package: mongo-10gen-server-2.4.10-mongodb_1.x86_64
--> Running transaction check
---> Package mongo-10gen.x86_64 0:2.4.10-mongodb_1 set to be updated
---> Package mongo-10gen-server.x86_64 0:2.4.10-mongodb_1 set to be updated
--> Processing Dependency: /bin/sh for package: mongo-10gen-server-2.4.10-mongodb_1.x86_64
--> Processing Dependency: /bin/sh for package: mongo-10gen-server-2.4.10-mongodb_1.x86_64
--> Finished Dependency Resolution
mongo-10gen-server-2.4.10-mongodb_1.x86_64 from MongoDB has depsolving problems
  --> Missing Dependency: /bin/sh is needed by package mongo-10gen-server-2.4.10-mongodb_1.x86_64 (MongoDB)
Error: Missing Dependency: /bin/sh is needed by package mongo-10gen-server-2.4.10-mongodb_1.x86_64 (MongoDB)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

遵循MongoDB documentation中列出的这些简单步骤:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org