MongoDB GPG - Invalid Signatures

后端 未结 11 1314
半阙折子戏
半阙折子戏 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:48

    Update all expired keys from Ubuntu key server in one command:

    sudo apt-key list | \
     grep "expired: " | \
     sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \
     xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys
    

    Command explanation:

    1. sudo apt-key list - lists all keys installed in the system;
    2. grep "expired: " - leave only lines with expired keys;
    3. sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' - extracts keys;
    4. xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys - updates keys from Ubuntu key server by found expired ones.

    Source

提交回复
热议问题