0

I've been trying to run sudo apt-get update and it keeps spitting out an error that it failed to fetch http://repository.spotify.com/dists/stable/InRelease. The output is as follows:

Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:4 http://repository.spotify.com stable InRelease [3,302 B]
Hit:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:6 https://dl.winehq.org/wine-builds/ubuntu xenial InRelease
Hit:7 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Err:4 http://repository.spotify.com stable InRelease
  The following signatures couldn't be verified because the public key         
is not available: NO_PUBKEY A87FF9DF48BF1C90
Fetched 3,302 B in 1s (2,125 B/s)
Reading package lists...Done
W: An error occured during the signature verification. The repository         
is not updated and the previous index files will be used. GPG error:         
http://repository.spotify.com stable InRelease: The following     
signatures couldn't be verified because the public key is not 
availiable: NO_PUBKEY A87FF9DF48BF1C90
W:Failed to fetch http://repository.spotify.com/dists/stable/InRelease 
The following signatures couldn't be verified because the pupblic key 
is not available: NO_PUBKEY A87FF9DF48BF1C90
W: Some index files failed to download. They have been ignored, or old     
ones used instead. `

Now is there some way to completely get rid of the spotify repostitory? or update it maybe? I cant figure it out.

zgraham
  • 11
  • 1
  • 4
  • 1
    To get rid of it, you have to delete the repository file. It's in `/etc/apt/sources.list.d/` and it is named like `spotify.list` or similar. – Stanley F. Aug 22 '18 at 05:49
  • These types of questions are a much better fit for the stack overflow sister site https://askubuntu.com/ However, what Stanley said should work. – jooon Aug 22 '18 at 08:09

2 Answers2

2

In the output identify the following value, the one you see right now is for reference

NO_PUBKEY 11111111111

Then you add it to the following command, in this case it is 11111111111

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 11111111111

Finally

$ sudo apt update

It worked for me, here is the source that helped me, I hope it will serve you.

https://linuxconfig.org/ubuntu-20-04-gpg-error-the-following-signatures-couldn-t-be-verified

-1

As the root cause of this is unknown at the moment I workarounded it by downloading the key with wget and adding it to apt trusted keys manually.

$ wget -q "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA87FF9DF48BF1C90" -O-  | gpg --dearmor > spotify-A87FF9DF48BF1C90.gpg

$ sudo mv spotify-A87FF9DF48BF1C90.gpg /etc/apt/trusted.gpg.d/

Apt updated spotify repository correctly.

Above data has been taken and tested from blog https://linuxer.eu/apt-key-gpg-keyserver-receive-failed/

deHaar
  • 17,687
  • 10
  • 38
  • 51
vanco
  • 1