【发布时间】:2014-06-20 17:22:03
【问题描述】:
我正在运行 ubuntu 并安装了 Mongo 2.6.0。
最近出现了一个新的 Mongo 次要版本(2.6.2),但由于某种原因,我无法使用 apt-get update && apt-get upgrade 升级到它(我记得在 2.4.x 版本上正确升级了次要版本)。
我认为我可以删除 mongo 并重新安装它,但这听起来并不吸引人。
我也知道这个问题本身不是编程,但我认为它对其他人有用,而且 SO 有一个很好的 mongo-community。 (但如果有人觉得它真的跑题了,请移动它)
这是实际输出:
ubuntu@ip-10-34-23-80:~$ sudo apt-get update && sudo apt-get upgrade
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty InRelease
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty-updates InRelease
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release.gpg
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates Release.gpg
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates Release
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty/main Sources
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty/universe Sources
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty/main amd64 Packages
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/main Sources
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/universe Sources
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/universe amd64 Packages
Ign http://security.ubuntu.com trusty-security InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty/main Translation-en_US
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty/main Translation-en
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty/universe Translation-en
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/main Translation-en_US
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/main Translation-en
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/universe Translation-en_US
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty-updates/universe Translation-en
Get:2 http://security.ubuntu.com trusty-security Release [58.5 kB]
Get:3 http://security.ubuntu.com trusty-security/main Sources [20.6 kB]
Get:4 http://security.ubuntu.com trusty-security/universe Sources [4,727 B]
Get:5 http://security.ubuntu.com trusty-security/main amd64 Packages [61.3 kB]
Get:6 http://security.ubuntu.com trusty-security/universe amd64 Packages [21.5 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://security.ubuntu.com trusty-security/main Translation-en_US
Ign http://security.ubuntu.com trusty-security/universe Translation-en_US
Fetched 168 kB in 2s (76.9 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
当我执行sudo apt-cache policy mongodb-org 时,我看不到有关2.6.2 版本的信息。
mongodb-org:
Installed: 2.6.0
Candidate: 2.6.0
Version table:
*** 2.6.0 0
100 /var/lib/dpkg/status
【问题讨论】:
-
我认为您在应用升级时可能打开了外壳或其他东西。我以前做过。退出所有工具,也许只是尝试重新安装“工具”包,或者只是再次处理安装。在后一种情况下先删除。
-
感谢@NeilLunn,我有我的开发机器和 2 台服务器,并尝试了几次 apt-get。它更新了很多东西,但不是 mongo。所有环境中的情况都是一样的。
-
我的意思是你知道它没有更新怎么办?只是通过shell的提示吗?还是日志中的服务器版本报告不会更改?尝试运行 apt-get upgrade 的输出是什么?这是否甚至表明包裹已被提取或是否有错误?我假装你在谈论你的开发环境,所以这不是题外话,但你真的可以在你的问题中涵盖更多内容。还要看看所有这些东西,它们都有日志。
-
我在终端输入
sudo apt-...。它寻找可能的更新,找不到与 mongo 相关的任何内容,仅此而已。我在问题中添加了实际输出。 -
试试
apt-get install mongodb作为一个命令。确保您已删除任何mongodb-10gen软件包,并且您应该拥有的唯一软件包是mongodb-org。还要查看您的 apt-get 历史记录,例如less /var/log/apt/history.log,以防之前出现问题。
标签: mongodb