MongoDB GPG - Invalid Signatures

后端 未结 11 1282
半阙折子戏
半阙折子戏 2020-12-04 06:46

I\'m installing MongoDB on an Ubuntu 14.04 machine, using the instructions at: https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

So I run:

相关标签:
11条回答
  • 2020-12-04 07:26

    It seems version 3.2.1 has been released on 11/Jan/2016, and the packages signature is bad since this moment. The packages signature were fine the day before.

    refs: https://jira.mongodb.org/browse/SERVER/fixforversion/15908/?selectedTab=com.atlassian.jira.jira-projects-plugin:version-summary-panel

    You can either add the --force-yes option, or wait for a few hours that the mongodb team sees and fixes the issue.

    There is already a ticket there: https://jira.mongodb.org/browse/SERVER-22144

    0 讨论(0)
  • 2020-12-04 07:26

    I also faced this issue when installing MongoDB 4.0 on Ubuntu 16.04. So I did.

    1. sudo rm /etc/apt/sources.list.d/mongodb*.list - remove any existing file for MongoDB

    2. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E52529D4 - add the key

    3. sudo bash -c 'echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-4.0.list' - create a new MongoDB repository list file

    Now, Complete the installation with an update of repositories then install MongoDB, enable the mongod service and start it up, and last, check your MongoDB version:

    sudo apt update
    sudo apt install mongodb-org
    
    systemctl enable mongod.service
    systemctl start mongod.service
    
    mongo --version
    
    0 讨论(0)
  • 2020-12-04 07:28

    I had the same problem, so I did:

    root@skarabi:~# apt remove mongodb-org

    Then:

    root@skarabi:~# sudo rm /etc/apt/sources.list.d/mongodb*.list

    After :

    root@skarabi:~# apt update

    0 讨论(0)
  • 2020-12-04 07:31

    You don't need to reinstall the mongo packages, but just change the key as following:

    List the keys to confirm it is expired:

    apt-key list | grep "expired:"
    

    Replace the key:

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xd68fa50fea312927
    

    The number 0xd68fa50fea312927 is the current valid key id (expires at 2019-10-09), as you can check here.

    0 讨论(0)
  • 2020-12-04 07:37

    Actually, the following is very important to solve the problem

    $ sudo rm /etc/apt/sources.list.d/mongodb*.list
    
    0 讨论(0)
  • 2020-12-04 07:43

    Sounds like you need to redo the installation steps for MongoDB. First,remove any existing repository file for MongoDB. Do as below.

    $ sudo rm /etc/apt/sources.list.d/mongodb*.list
    

    Next, add the key: (without the key, the repository will not load).

    $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
    

    Now, create a new MongoDB repository list file:

    $ echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
    

    After adding the repository details, we need to update the packages list.

    $ sudo apt-get update
    

    Now install MongoDB.

    sudo apt install mongodb-org
    

    Hope this helps !

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