MongoDB 2.6 Update Error

前端 未结 4 2125
庸人自扰
庸人自扰 2021-02-10 14:34

I am getting conflict when

[root@MongoDB ec2-user]# sudo yum install mongodb-org Loaded plugins: priorities, security, update-motd, u

相关标签:
4条回答
  • 2021-02-10 15:24

    remove the old mongodb

    sudo yum remove mongo-10gen-server mongo-10gen-tools mongo-10gen-shell mongo-10gen-mongos mongo-10gen

    install the new mongodb (prerequisitely, you must config the yum source, refer here )

    sudo yum install mongodb-org

    0 讨论(0)
  • 2021-02-10 15:28

    You have to remove packages of MongoDB 2.4:

     sudo yum remove mongo-10gen*
    

    and then install packages of new MongoDB 2.6:

    sudo yum install mongodb-org
    
    0 讨论(0)
  • 2021-02-10 15:34

    Seems that you are upgrading from version 2.4 to 2.6 which apparently has changed the package names.

    I guess you will have to remove/erase the old package mongodb-10gen* and then run this new install command for it to work.

    0 讨论(0)
  • 2021-02-10 15:37

    Since the package name has changed, you do need to remove the old package and install the new one. However, instead of doing this as two steps, it is cleaner to use the yum shell. This will remove the old package and install the new one in a single transaction:

    yum shell
    > install mongodb-org
    > remove mongo-10gen
    > remove mongo-10gen-server
    > run
    --> Running transaction check
    ---> Package mongo-10gen.i686 0:2.4.10-mongodb_1 will be erased
    ---> Package mongo-10gen-server.i686 0:2.4.10-mongodb_1 will be erased
    ---> Package mongodb-org.i686 0:2.6.0-1 will be installed
    --> Processing Dependency: mongodb-org-tools = 2.6.0 for package: mongodb-org-2.6.0-1.i686
    --> Processing Dependency: mongodb-org-shell = 2.6.0 for package: mongodb-org-2.6.0-1.i686
    --> Processing Dependency: mongodb-org-server = 2.6.0 for package: mongodb-org-2.6.0-1.i686
    --> Processing Dependency: mongodb-org-mongos = 2.6.0 for package: mongodb-org-2.6.0-1.i686
    --> Running transaction check
    ---> Package mongodb-org-mongos.i686 0:2.6.0-1 will be installed
    ---> Package mongodb-org-server.i686 0:2.6.0-1 will be installed
    ---> Package mongodb-org-shell.i686 0:2.6.0-1 will be installed
    ---> Package mongodb-org-tools.i686 0:2.6.0-1 will be installed
    --> Finished Dependency Resolution
    
    ================================================================================
     Package                  Arch       Version                 Repository    Size
    ================================================================================
    Installing:
     mongodb-org              i686       2.6.0-1                 10gen        4.6 k
    Removing:
     mongo-10gen              i686       2.4.10-mongodb_1        @10gen       181 M
     mongo-10gen-server       i686       2.4.10-mongodb_1        @10gen        30 M
    Installing for dependencies:
     mongodb-org-mongos       i686       2.6.0-1                 10gen        6.7 M
     mongodb-org-server       i686       2.6.0-1                 10gen        8.9 M
     mongodb-org-shell        i686       2.6.0-1                 10gen        4.2 M
     mongodb-org-tools        i686       2.6.0-1                 10gen         88 M
    
    Transaction Summary
    ================================================================================
    Install  1 Package  (+4 Dependent packages)
    Remove   2 Packages
    
    Total download size: 108 M
    Is this ok [y/d/N]: y
    Downloading packages:
    (1/5): mongodb-org-2.6.0-1.i686.rpm                      | 4.6 kB     00:00
    (2/5): mongodb-org-mongos-2.6.0-1.i686.rpm               | 6.7 MB     00:00
    (3/5): mongodb-org-server-2.6.0-1.i686.rpm               | 8.9 MB     00:00
    (4/5): mongodb-org-shell-2.6.0-1.i686.rpm                | 4.2 MB     00:00
    (5/5): mongodb-org-tools-2.6.0-1.i686.rpm                |  88 MB     00:04
    --------------------------------------------------------------------------------
    Total                                               19 MB/s | 108 MB  00:05
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : mongodb-org-server-2.6.0-1.i686                              1/7
      Installing : mongodb-org-mongos-2.6.0-1.i686                              2/7
      Installing : mongodb-org-tools-2.6.0-1.i686                               3/7
      Installing : mongodb-org-shell-2.6.0-1.i686                               4/7
      Installing : mongodb-org-2.6.0-1.i686                                     5/7
      Erasing    : mongo-10gen-server-2.4.10-mongodb_1.i686                     6/7
      Erasing    : mongo-10gen-2.4.10-mongodb_1.i686                            7/7
      Verifying  : mongodb-org-2.6.0-1.i686                                     1/7
      Verifying  : mongodb-org-shell-2.6.0-1.i686                               2/7
      Verifying  : mongodb-org-tools-2.6.0-1.i686                               3/7
      Verifying  : mongodb-org-mongos-2.6.0-1.i686                              4/7
      Verifying  : mongodb-org-server-2.6.0-1.i686                              5/7
      Verifying  : mongo-10gen-server-2.4.10-mongodb_1.i686                     6/7
      Verifying  : mongo-10gen-2.4.10-mongodb_1.i686                            7/7
    
    Removed:
      mongo-10gen.i686 0:2.4.10-mongodb_1
      mongo-10gen-server.i686 0:2.4.10-mongodb_1
    
    Installed:
      mongodb-org.i686 0:2.6.0-1
    
    Dependency Installed:
      mongodb-org-mongos.i686 0:2.6.0-1      mongodb-org-server.i686 0:2.6.0-1
      mongodb-org-shell.i686 0:2.6.0-1       mongodb-org-tools.i686 0:2.6.0-1
    
    Finished Transaction
    > exit
    Leaving Shell
    
    0 讨论(0)
提交回复
热议问题