I issued this command to try to install mongodb

wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -

It all seemed fine untill I tried to run apt-get update and got a NO_PUBKEY error. I tried with sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY> and did not work at all. Now I don't even get the NO_PUBKEY error while trying to update. I get a 0% [Waiting for headers] and then this is what I get:

Hit:10 https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                                
Ign:11 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 InRelease                                                                          
Hit:12 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                                                             
Hit:13 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 Release                                                        
Hit:14 https://download.sublimetext.com apt/stable/ InRelease                                                                    
Err:17 http://repo.steampowered.com/steam precise InRelease              
  Connection failed [IP: 80]
Reading package lists... Done
W: Failed to fetch http://repo.steampowered.com/steam/dists/precise/InRelease  Connection failed [IP: 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

Despite not having any connection issues.

Reinstalling apt is my last resort but I don't really know how to do that and I'm afraid I could only make things worse

  • Trusty Tahr (14.04) was released in April 2014 and reached end of Public support in April 2019. Are you still using 14.04?
    – Kulfy
    Apr 7 '20 at 13:33
  • no, i'm using 18.04 bionic beaver
    – toploz
    Apr 7 '20 at 13:36
  • The error has nothing to do with MongoDB. You are encountering error becuase of Steam's repository. It seems repo.steampowered.com is down at the moment. You can either disable that or wait for Steam to fix.
    – Kulfy
    Apr 7 '20 at 13:36
  • i truncated the output to the last lines because i can't post too many links since i'm new, it was not only about steam but all the repositories.
    – toploz
    Apr 7 '20 at 13:38
  • You need not to worry about the other ones. See What does 'Ign' , Get or 'Hit' mean when running an apt-get update?
    – Kulfy
    Apr 7 '20 at 13:45

For me the solution was install y-ppa-manager and with the ui menu install missing gpg keys. I share my solution, i hope its helps

$ sudo add-apt-repository ppa:webupd8team/y-ppa-manager
$ sudo apt update
$ sudo apt install y-ppa-manager

then run the app with "y-ppa-manager" and in the menu press "advanced" option, and the press "try to import all missing GPG keys".

reference image of y-ppa-manager and what need to press

if is not the solution you need, well good luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.