我在CentOS沙盒服务器上安装了
mongodb 2.6.11.
原文链接:https://www.f2er.com/bash/385677.htmlDec 03 22:24:38 Updated: mongodb-org-mongos-2.6.11-1.x86_64 Dec 03 22:25:07 Updated: mongodb-org-tools-2.6.11-1.x86_64 Dec 03 22:25:08 Updated: mongodb-org-shell-2.6.11-1.x86_64 Dec 03 22:26:39 Updated: mongodb-org-server-2.6.11-1.x86_64 Dec 03 22:29:37 Updated: mongodb-org-2.6.11-1.x86_64
我想将该沙箱升级到最新的mongodb版本.所以,我按照这里的指示:
https://docs.mongodb.com/master/tutorial/install-mongodb-on-red-hat/
特别是,我必须创建一个/etc/yum.repos.d/mongodb-org-3.4.repo文件.这工作得很好.
# mongod -version db version v3.4.2
现在,我想说服自己,如果需要,我可以将mongodb降级回2.6.11版本.
当我尝试降级时,我收到一个错误:
# yum downgrade mongodb-org Error: Package: mongodb-org-3.4.1-1.el6.x86_64 (mongodb-org-3.4) Requires: mongodb-org-mongos = 3.4.1 Installed: mongodb-org-mongos-3.4.2-1.el6.x86_64 (@mongodb-org-3.4) mongodb-org-mongos = 3.4.2-1.el6 Available: mongodb-org-mongos-2.6.0-0.1.rc0.x86_64 (mongodb) mongodb-org-mongos = 2.6.0-0.1.rc0 . . . . . Available: mongodb-org-mongos-2.6.12-1.x86_64 (mongodb) mongodb-org-mongos = 2.6.12-1 Available: mongodb-org-mongos-3.4.0-1.el6.x86_64 (mongodb-org-3.4) mongodb-org-mongos = 3.4.0-1.el6 Available: mongodb-org-mongos-3.4.1-1.el6.x86_64 (mongodb-org-3.4) mongodb-org-mongos = 3.4.1-1.el6 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
跳过的建议失败了.
# yum downgrade --skip-broken mongodb-org Loaded plugins: fastestmirror Setting up Downgrade Process Repository 'CentOS-EPEL' is missing name in configuration,using id Loading mirror speeds from cached hostfile * CentOS-EPEL: mirrors.xmission.com * base: mirror.raystedman.net * extras: denver.gaminghost.co * updates: mirror.sesp.northwestern.edu Resolving Dependencies --> Running transaction check ---> Package mongodb-org.x86_64 0:3.4.1-1.el6 will be a downgrade --> Processing Dependency: mongodb-org-tools = 3.4.1 for package: mongodb-org-3.4.1-1.el6.x86_64 --> Processing Dependency: mongodb-org-shell = 3.4.1 for package: mongodb-org-3.4.1-1.el6.x86_64 --> Processing Dependency: mongodb-org-server = 3.4.1 for package: mongodb-org-3.4.1-1.el6.x86_64 --> Processing Dependency: mongodb-org-mongos = 3.4.1 for package: mongodb-org-3.4.1-1.el6.x86_64 ---> Package mongodb-org.x86_64 0:3.4.2-1.el6 will be erased Packages skipped because of dependency problems: mongodb-org-3.4.1-1.el6.x86_64 from mongodb-org-3.4
在/etc/yum.repos.d我现在有两个.repo文件:
mongodb-org-3.4.repo mongodb.repo
mongodb.repo有这个:
[mongodb] gpgcheck=0 name=MongoDB/10gen Repository enabled=1 baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
并且,mongodb-org-3.4.repo,有:
[mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
我怎样才能回到mongodb 2.6.11?
更新:2017年2月24日
我能够删除五个mongo包.
# rpm -qa | grep mongo mongodb-org-mongos-3.4.2-1.el6.x86_64 mongodb-org-tools-3.4.2-1.el6.x86_64 mongodb-org-server-3.4.2-1.el6.x86_64 mongodb-org-shell-3.4.2-1.el6.x86_64 mongodb-org-3.4.2-1.el6.x86_64 # yum remove mongodb-org # yum remove mongodb-org-shell # yum remove mongodb-org-mongos # yum remove mongodb-org-tools # yum remove mongodb-org-server
# cd /etc/yum.repos.d # mv mongodb-org-3.4.repo mongodb-org-3.4.repo.NOT # yum install mongodb
然后我安装了mongodb(因为我遇到了熟悉的冲突,试图安装mongodb-org).
# mongo -version MongoDB shell version: 2.4.14
但是,我仍然卡住,因为我无法在mongodb-org中安装所有mongo软件包,当我尝试升级mongo时,希望到达2.6.11,我被告知没有标记用于升级的软件包.