yum install mongodb 3.2 fails

后端 未结 13 1319
自闭症患者
自闭症患者 2021-02-08 00:04

I am trying to install mongodb 3.2 on a CentOS 7 machine and facing issues in locating the packages.

I have updated the repo file as per the documentation:



        
相关标签:
13条回答
  • 2021-02-08 00:33

    I know this issue is old and more than 2 years but I have received this error recently in Mongo DB 4.0

    I have checked my yum.conf by

     vi /etc/yum.conf yum.conf
    

    and there was one line with the following.

    exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* **mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools** mydns* nsd* p0f php* proftpd* pure-ftpd* spamassassin* squirrelmail*
    

    Removed the

    mod_ssl* mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools
    

    and changed it to

    exclude=courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* p0f php* proftpd* pure-ftpd* spamassassin* squirrelmail*
    

    This has fixed my issue and should fix yours.

    0 讨论(0)
  • 2021-02-08 00:34

    @nikolai.serdiuk seems to be correct. The baseurl provided in Mongo's Documentation doesn't seem to be functional. Replace that step with this instead (1):

    yum-config-manager --add-repo http://repo.mongodb.org/yum/redhat/mongodb-org.repo

    and then continue on with (2):

    sudo yum install -y mongodb-org

    Hope this helps.

    0 讨论(0)
  • 2021-02-08 00:35

    This command

    yum-config-manager --add-repo http://repo.mongodb.org/yum/redhat/mongodb-org.repo
    

    will create the repo as above suggested. Then it will work.

    0 讨论(0)
  • 2021-02-08 00:38

    Check and remove old version mongodb

    yum list installed mongodb.x86_64
    yum remove mongodb.x86_64
    

    It helps

    0 讨论(0)
  • 2021-02-08 00:39

    first you have to create repo in your redhat system.

    cd /etc/yum.repos.d/mongodb-org.repo
    

    and Enter i, and copy-past this.

    [mongodb-org-4.0]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
    

    and save it like- enter ctrl + : and enter : + qw and run this command

    yum install mongodb-org

    0 讨论(0)
  • 2021-02-08 00:42

    I figured out what was my problem. It was in my yum.conf file

    exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools
    

    Once I commented out this line from yum.conf, everything went fine.

    0 讨论(0)
提交回复
热议问题