13

When I run software updater it says that it failed to download repository information and to check Internet connectivity.

I have Internet connectivity.

How do I fix this?

editing to add content of sources,list:

sorry I can't figure out how to paste in the content of sources.list without making a huge mess. Some of it previews as really large bold print. I tried to follow the block quoting and code rules but it is a huge mess anyway.

bruce
  • 2,887
  • 7
  • 20
  • 22

6 Answers6

8

Another solution is, sometimes it couldn't find the packages from the selected server. You should change it to the best matched server.

  • Go to Software & Updates, Ubuntu Software tab,
  • Then on Download from click Other
  • Select Best Server and it will auto update the sources.
  • Now install it from Software Updater or do sudo apt-get upgrade
Matthew
  • 163
Rahil Wazir
  • 319
  • 6
  • 11
5

In my experience, there are at least three other causes of the failure: incorrect repository location, repository is down, and incorrect proxy settings.

First, check your software repository location in /etc/apt/sources.list or run software-properties-gtk. Make sure you can reach all of the repository, e.g. by using the web browser to make sure that the site is not currently down.

If it's OK, then check your system-wide proxy settings. Because software update is run by using root privilege, so the proxy settings used would be the root's too. Check this question to set system-wide proxy settings.

Another cause might be firewall, but I'm not sure :).

Hope it helps.

UPDATE

It is not a problem if you get message gpg: /tmp/tmp<somerandom>/trustdb.gpg: trustdb created when running software-properties-gtk from the terminal.

fikr4n
  • 1,255
  • I ran sotware-properties-gtk and got this: gpg: /tmp/tmpmggoaz/trustdb.gpg: trustdb created – bruce May 19 '13 at 15:42
  • 1
    I did a sudo apt-get update from terminal and got a bunch of 404 errors. I went the the software and updates and deselected the sources that were causing the 404 errors - I hope I didn't screw anything up by doing that. There is one source that is 'timing out.' Not sure what I should do with that one. – bruce May 19 '13 at 15:50
  • 1
    I just did the sudo apt-get update and ran software updater and it worked. Not sure if it was the 404 errors or the timing out source or both. – bruce May 19 '13 at 15:51
  • In my case, I could reach all the repository URLs in a browser just fine. But it was still one of the custom PPAs/repositories/sources (a non-ubuntu one) that was the problem, even though that PPA worked fine yesterday. Disabling that PPA in software-properties-gtk made everything work again. – Jonathan Hartley Feb 04 '20 at 16:04
  • One problem could be: check in Software Updates if you have a "ppa" from Tor-browser. Delete that "ppa" and try again. Good luck! – eugen Apr 18 '21 at 10:36
  • I got the message: "pk-client-error-quark: E: The repository 'http://ppa.launchpad.net/yorba/daily-builds/ubuntu focal Release' does not have a Release file. I unticked this box and all is now fine. – Duncan Jul 13 '21 at 07:37
  • Sorry - I'm 75 years old and can't follow this. Oh well ...... – Duncan Jul 18 '23 at 08:26
3

In my case the error messages about not being about to get repository information, checking internet connectivity and not being able to find a "Best Server" were complete red herrings.

The root cause of my problem was that I was trying to upgrade from 13.10 to 14.04 and my update settings were set to only check for LTS updates. Whenever I tried explicitly checking for an update, it said "your system is already up-to-date". I wrongly guessed at first that this was due to a network issue (proxy etc) leading to no updates being found.

When I changed the updater settings to check for ANY new version, I got a message saying 13.10 is no longer supported, with a new button for the upgrade option. Clicking this new button worked fine, with no other network or settings changes.

This looks like a bug to me, since 14.04 is an LTS update, but anyway, it worked!

freeeman
  • 31
  • 1
  • 5 years later, and still the same! Going from 18 to 19 posed the same issues and misinformed guesses. Thanks! – mikegross Jun 21 '20 at 10:54
0

In my case, the error messages start showing after upgrade to ubuntu 20.04. When I changed network proxy settings from Automatic to Disabled error disappeared.

Here is how:

  1. Open the Network tab and select proxy settings.
  2. Change form Automatic to Disabled.
Huku
  • 1
0

Run sudo apt update in terminal and check what error it says run software-properties-gtk and go to other software and uncheck all the error causing ones and then run sudo apt update it will work

0

Try sudo ldconfig /usr/bin/gpg. See: https://unix.stackexchange.com/a/677711/114401

It worked for me. sudo apt update now works again.