Ubuntu – Fail to sudo apt-get update

updates

I am not able to sudo apt-get update successfully. I am using Ubuntu 16.04.1 LTS

Error message:

W: GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: At least one invalid signature was encountered.

More error messages attached in the screenshot.

There are lots of "not signed" and "can't be authenticated" error messages.

How could I fix it?

Best Answer

  • You should use the --allow-unauthenticated option to skip it:

    sudo apt-get --allow-unauthenticated update
    sudo apt-get --allow-unauthenticated upgrade
    

    Or if you have have the id of the missing key (from the output of apt-get), you can add it to the apt key manager to be authenticate :

     sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys put_the missing_key_here