Apt-key error can't apt-get update

I started getting an error, when I run apt-get update it says unknown apt-key error and gpg error

Can anybody help me fix this

You do not give any specifics, so it might be difficult. (I did this a long time ago, so you are also taxing my memory. :slight_smile: ) I get the impression this was working and is a new problem. If so, my suggestions may not help.

Get the key from your source. If you are using Gnome, make sure that the key is imported to “Software and Updates”->Authentication. Also, make sure that repository is in your list of sources. If memory serves, I also explicitly added the key to the GPG ring but I am not sure it is necessary to do both.

If this was working, you may just want to check if the key has changed or is expired.

Thanks for the reply, sorry for the little information this is driving me nuts haha,

So I found the pure-os-archives keyring , however I don’t know how to implement it,

1 Like

There is no key, Im pretty sure I run sudo apt-key list and returns apt-key is depreciated manage keyring files in trusted.gpg.d instead (see apt-key (8))

I found what you are talking about, can you guide me to the next steps? Do I import the gpg download to here?

q

Wow. I do not think I have had to install keys in my PureOS environment except for the one foreign repository I use for a sailing application and my VPN. I am not sure how to help with Byzantium keys. Are they listed in /etc/apt/trusted.gpg.d (*.gpg)? You won’t be able to see the contents, but are they there?

I think you should be seeing something in that Software and Updates graphical interface. I tried the same apt-key list command you did, even though it is deprecated. (It is still in Debian 11 and in Byzantium.) I see the same keys as listed in Software and Updates.

I looked at your output from above. I just do not see any of these apt-key errors that you are getting from Byzantium when updating, so something fundamental is wrong.

I also noticed Brave does not have a key. You may want to start here. Although that link is pretty old, it might point you in the right direction for that one. (I do not use Brave. You might want to check these fora for more information on it and how to install it.)

I see a VPN for you too. Mine had a package that set everything up, and it seems to have bypassed the authentication I mentioned before. Maybe that is a hint. It did add a key to the gpg ring. (gpg --list-public-keys; don’t post the output.)

Fortunately, a lot more knowlegable people than I look at these topics. I was kind of hoping it would be just a foreign repository problem.

PS. Are these packages installed?

debian-archive-keyring/byzantium,byzantium,now 2021.1.1
debian-keyring/byzantium,byzantium,now 2021.07.26
pureos-archive-keyring/byzantium,byzantium,now 2021.11.0

The PureOS key ring is in /etc/apt/trusted.gpg.d/pureos-archive-keyring.gpg This key ring should work with your Librem 14 and the Byzantium (PureOS 10) software suite. You should have this already on your system and shouldn’t need to do anything to use it.

It appears the other errors are related to missing keys for other software like the Brave browser who are responsible for providing their own keys to their own repos as we do not distribute their software.

2 Likes

Ok thank you both I’ll give this a go and let you know how I go, but when I go into etc/apt/trusted.gpg.d/pureos-archive-keyring.gpg

There is nothing in there no gpg key, how can I input the gpg key

So are you saying that the file does not exist or that the file is empty (zero length) or something else?

2 Likes

I am with @irvinewade. I am going to assume there is nothing there.

You said this before. Is that a .gpg file that you found? (BTW, that would puzzle me a bit too.) If so, I think @jeremiah suggested copying it there.

It is not my laptop, so it is dangerous to recommend something, especially without more information. As a last resort, my other suggestion would be to reinstall pure-archive-keyring, assuming you can get to the repository. (Use the --reinstall option for apt. Don’t uninstall and install.)

1 Like

Yes, just about right question that @Ass113 needs to ask this Linux distro:
apt list pureos-archive-keyring

And if pureos-archive-keyring package not [installed] either:
sudo apt update
sudo apt reinstall pureos-archive-keyring
or
sudo apt install pureos-archive-keyring

If above for some reason doesn’t work (as not retested from my side), please proceed with downloading related package and:
cd Downloads −− or any other related folder
sudo dpkg --install pureos-archive-keyring_2021.11.0_all.deb
sudo apt update
sudo apt upgrade

EDIT:
Official “Debian 9+, Ubuntu 16.04+ and Mint 18+” chapter instructions should solve Brave key issue. And if/how to enable ppa:nilarimogard/webupd8 is another challenge of yours (if you really want to keep this 3rd party repository, please see under technical details for further explanation … on how to enable hirsute main perhaps?).

2 Likes

Yep, there is nothing in the file it is empty.

Thank you Quarnero, this has fixed my errors, working fine now!!

Thank you everybody for your help and time I appreciate it very much :slight_smile: :blush:

2 Likes