Ubuntu: The Weird apt Repository Certificate Error, and How I Fixed It

Advertisement

A while back, apt-get update started throwing something weird at me:

选区_062.png

Advertisement

“The following signatures couldn’t be verified because the public key is not available: XXXXXXX”

My first thought was whether I’d gotten myself MITM’d or DNS-poisoned — the public key just up and vanished?

So I flushed the DNS cache and ran the update again. Same problem.

Fine, I’ll add them by hand then. Went through them one by one:

选区_063.png

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXX

Updated. Same problem. I even went and deleted the key files under /etc/apt/ and updated again — still the same.

Right when I was completely stumped, Google handed me one piece of info:

选区_061.png

apt can only handle 40 keys…..

apt can only handle 40 keys…..

apt can only handle 40 keys…..

apt can only handle 40 keys?

选区_066.png

Are you kidding me?

Checked my /etc/apt/trusted.gpg.d/ directory — yep, exactly 40. And I’d added more than 40 PPAs.

Cleaned out the PPAs I wasn’t using, ran apt-get update again, problem solved.

Lately I feel like I’m constantly wrestling with one dumbass problem after another.

Discuss this post on plumz.me

Comments are hosted on the Chinese main site. This mirror is read-only.

Table of Contents