报错如下:W: GPG error: https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release: The following signatures were invalid: KEYEXPIRED 1544811256
W: The repository 'https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
解决办法:
查找任何过期的存储库密钥及其ID,用apt-key,如下:
apt-key list | grep expired
得到类似一下结果:
91FA4AD5即是密钥
更新密钥
sudo apt-key adv --recv-keys --keyserver keys.gnupg.net 91FA4AD5