CentOS 7 - yum não instalará o mongodb

0

Estou tentando instalar o mongodb v3.4 guiado por MongoDB .
Primeiro eu crio "/etc/yum.repo.d/mongodb.repo", então eu colo esta informação repo no arquivo:

[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

e eu tento instalar o mongodb-org, mas recebo o seguinte erro do yum:

Loaded plugins: fastestmirror
base

| 3.6 kB  00:00:00     
extras
| 3.4 kB  00:00:00     
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/solutions/69319

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/



 One of the configured repositories failed (MongoDB Repository),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=mongodb-org-3.4 ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable mongodb-org-3.4
    or
        subscription-manager repos --disable=mongodb-org-3.4

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=mongodb-org-3.4.skip_if_unavailable=true

failure: repodata/repomd.xml from mongodb-org-3.4: [Errno 256] No more mirrors to try.
https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

Esse erro é devido a restrições do SELinux? Como devo permitir que o yum instale o mongodb?

    
por Brian SP2 07.06.2017 / 01:08

3 respostas

2

Isso pode ser tarde demais, mas depois de se deparar com o mesmo problema, segui uma combinação de Instalando o MongoDB via yum no AWS Linux falha: Erro de HTTPS 404 - Não encontrado (no estouro de pilha) com uma das respostas para Erro Yum ao instalar o MongoDB no CentOS? (não o selecionado), então meus passos foram:

sudo rm -rf /etc/yum.repos.d/mongod*
sudo yum clean all

crie novamente o arquivo repo

sudo vi /etc/yum.repos.d/mongodb-org-3.4.repo

cole o seguinte (observe que estou substituindo '$ releasever' por 7 para o meu sistema):

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

eu corri isso e foi bem-sucedido:

sudo yum install -y mongodb-org
    
por 25.09.2017 / 20:56
0

acabou de encontrar uma maneira de instalar uma versão antiga do mongoDB, não da versão v3.4.

tentou escrever esta informação em "/etc/yum.repo.d/mongodb.repo":

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

então o yum começou a instalar o mongodb-org-2.6.12 seguindo o comando:

sudo yum install mongodb-org

novamente, ele faz meu aplicativo funcionar, mas eu posso precisar de uma versão mais nova do mongoDB.
alguma ajuda na instalação da v3.4?

    
por 07.06.2017 / 01:18
0

O mongodb-repo não funcionou para mim no CentOS 7. A base não parece existir. Eu usei

dnf install mongodb-server
dnf install mongodb

Esta versão instalada 3.4 na minha máquina. Como é provisionado por meio de dnf , ele deve pegar automaticamente as atualizações daqui para frente.

    
por 23.10.2017 / 02:49