How to solve “The following packages cannot be authenticated”

June 15th, 2006

Users of Debian’s testing or unstable distributions may be noticing messages from apt saying things like:

WARNING: The following packages cannot be authenticated!
  foo bar baz
Install these packages without verification [y/N]?

I noticed today that google doesn’t turn up good hits for the fix. The fix is really simple:

apt-get install debian-archive-keyring
apt-get update

That’s it. You now have secure packages from Debian. Nice, eh?

Categories: Debian

Tags: , , , Leave a comment

Comments Feed35 Comments

  1. Ari Pollak

    Are you sure? The third Google hit for “apt the following packages could not be authenticated” turned up this as the third hit:


    John Goerzen Reply:

    My search term was:

    apt-get “packages could not be authenticated”

    (With that message in quotes, just like I’ve typed it)

    Indeed, the Wiki page doesn’t contain the relevant error message.

    However, that looks like a very informative page. I’m glad you sent the link — hopefully if anyone finds this page with Google, they can follow it to the wiki. And it probably wouldn’t hurt to add the warning message to the wiki page.


    Anonymous Reply:

    Perhaps because the error message is “cannot be authenticated”, not “could not be authenticated”?


  2. Brian Detweiler

    First hit on Google turns up this simple solution. Thanks dude!


  3. Hideo "Frank" Akino

    Thanks! It worked for me.


  4. Trevor

    Yes, thanks!
    I just needed to run apt-get update, and then it worked.


  5. Dustin

    Awesome, a fix :) Seems this page is turning up at around secondish on google as well, bravo.


  6. Anonymous

    Thank you!!! It took several wrong google hits before I found your page. In most of the pages I saw the person was just ignoring it and saying Yes anyway! I am very glad you posted an easy fix! Works great!! Thanks again!


  7. Scott

    Thank You!


  8. Bhasker C V

    open /etc/apt/apt.conf and add this line
    APT::Get::AllowUnauthenticated 1 ;


    Daniel Kahn Gillmor Reply:

    Please don’t allow unauthenticated packages. that defeats the purpose of signed apt repositories entirely.

    This is a feature a long time in coming, and it’s a good one in today’s untrustworthy network. disabling it is a bad idea.


    Anonymous Reply:

    But it’s fundamentally broken – you have to upgrade the keys before upgrading from the archive, and the keys are frequently out of date.. eg. from today:

    # apt-get install debian-keyring debian-archive-keyring
    Reading package lists… Done
    Building dependency tree… Done
    debian-keyring is already the newest version.
    debian-archive-keyring is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.

    # apt-get upgrade
    Reading package lists… Done
    Building dependency tree… Done
    The following packages will be upgraded:
    adduser apt apt-utils base-files bash bsdmainutils bsdutils busybox
    console-common console-data coreutils cron dash debconf debconf-i18n

    WARNING: The following packages cannot be authenticated!
    base-files debianutils bash bsdutils libc6 libc6-xen tzdata libsepol1
    libselinux1 coreutils dpkg e2fslibs e2fsprogs gzip hostname libdb4.3
    libpam-runtime libpam0g libpam-modules login mount ncurses-bin perl-modules

    The keys are out of date for about 80% of the downloaded packages, including important ones like libc6 – basically all that implied security does nothing because you *must* allow unsigned installs to be able to upgrade.


    Progfou Reply:

    You have to “apt-get update” before “apt-get upgrade” !

    When “apt-get instal …” tells you have the last version installed, it’s from its own knowledge of what the last version is. And this “knowledge” has to be updated using “apt-get update”.

    Yaroslav Halchenko Reply:

    If by mistake you typed
    etch updates/main updates/contrib updates/non-free
    instead of
    etch/updates main contrib non-free
    you will get ‘The following packages cannot be authenticated!’ because apt will failed to fetch Release.gpg

  9. Dusty Wilson

    If this doesn’t work for you, try this command instead:

    apt-key update


    Ian Campbell Reply:

    I have now tried all the above and had no luck. I have a fresh install of Etch using the latest weekly release. apt-get update shows:
    GPG error: etch/updates Release: The following signatures were invalid: BADSIG A70DAF536070D3A1 Debian Archive Automatic Signing Key (4.0/etch)
    I tried apt-get install debian-archive-keyring
    That said I had the latest version.
    apt-key update told me it had processed 5 and 5 were unchanged.
    In desperation I added

    APT::Get::AllowUnauthenticated 1 ;
    to my /etc/apt/apt.conf but it still has the gpg error when I run apt-get update.

    Any further ideas would be gratefully received. I am totally out of them.


  10. Economic and Culture Observer (Lenno Cornish)

    Does anyone here know how to translate rpm packages to deb ones?


    John Goerzen Reply:

    Look at the alien package.


  11. M Hasan

    The following link solved my problem.u can try if keyring install dont work.


  12. Donnie

    Thanks for the tip, dude. Worked for me.


  13. al37919

    one more possibility: check that the system time is correct


  14. Slava

    for me worked only

    *apt-key update*


  15. {void}

    If you’ve disabled authentication in apt[itude] settings, you’ll likewise get this error even if authentication is otherwise possible/working (makes a certain degree of sense; a kind of reminder that authentication isn’t “functional”, but it would be better if it simply said “WARNING: authentication disabled”).

    Regardless, to “fix” this, you need to search for auth and trust in /etc/apt. You can fetch a list of files with auth or trust keywords in them using the command:
    grep -iE ‘auth|trust’ -rl /etc/apt/

    Check the files for proper settings.

    I install all my computers using FAI, and FAI sets this by default (unless you tweak it so it doesn’t). Presumably, this is to prevent install problems with badly implemented local debian repositories. Our repositories are properly implemented (even our custom repository), so we keep auth enabled.

    I don’t know if this is the case with Debian, or just Ubuntu, but the fix is the same in any case.


  16. Peter

    Thank you, thank you, thank you! :)


  17. Andrew

    thanks. this worked perfectly! :)


  18. Ming

    Thx, bro!


  19. Steffen



  20. Andy

    I had to update the keyring and tell it to install the unverified keyring package. Then everything worked. I could not find a solution that didn’t require the installation of at least one unverified package.


  21. vileda



  22. Adrian Midgley

    apt-key update ?


  23. Paolo

    This did not happen in previousnreleases. A major change like this, that brings thousands of users like crazy thinking “why is Linux becoming so fond of labyrinthine solutions to simple questions”, should prompt useful practical info to the user.


  24. Dan

    When I run “apt-get install debian-archive-keyring” I get that error itself,

    “WARNING: The following packages cannot be authenticated!

    What now?


    jgoerzen Reply:

    Add –allow-unauthenticated to apt-get


  25. Al

    Easiest fix ever!


  26. wtf

    Also downloaded the key manually and installed it. Still doesn’t work. Debian has been fucking pissing me off lately. I’m done with it.


Leave a comment

Feed / How to solve “The following packages cannot be authenticated”