Archive for February, 2018

[mongodb] invalid GPG signatures

February 8, 2018 Leave a comment

I have an Ubuntu 14.04 LTS box with MongoDB. When I tried to update the packages, I got a similar error:

W: GPG error: trusty/mongodb-org/3.2 Release: The following signatures were invalid: BADSIG D68FA50FEA312927 MongoDB 3.2 Release Signing Key 
WARNING: The following packages cannot be authenticated!
mongodb-org-shell mongodb-org-server mongodb-org-mongos mongodb-org-tools mongodb-org E: There are problems and -y was used without --force-yes


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

Full explanation of this is here. In a nutshell: update expired keys from Ubuntu key server.