Wednesday, 5 December 2012

Fix for "packages cannot be authenticated" warning on Ubuntu

Sometimes when installing packages on Ubuntu Linux, you'll get a warning like this:

sudo apt-get install foo bar
    ...
    WARNING: The following packages cannot be authenticated!

    foo bar
Install these packages without verification [y/N]?


The fix is trivial...
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get install foo bar

The key thing is to clean APT's cache of downloaded packages.  But while we're there, we also autoremove any orphaned dependency packages, and update the APT database, before attempting to install the packages you asked for.

6 comments:

  1. I like when it's a good solution, thanks

    ReplyDelete
  2. worked like a charm :)

    thank you,
    Manu

    ReplyDelete
  3. hi, thank you so much, i fixed it

    ReplyDelete
  4. ~Thank you very much !!!!!!!!

    ReplyDelete
  5. Martin is there another possibility? That did not work for me even though it looks like the exact problem I am having.

    ReplyDelete
  6. That ought to work - assuming your Ubuntu system is still in support. I wonder if you need to fetch updating signing keys? See https://chrisjean.com/fix-apt-get-update-the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-available/

    ReplyDelete

Spammers: please stop wasting my time. All comments are moderated before publication.