Running "sudo apt-get update" returns connection errors
Solution 1
This was caused by Kaspersky Total Security version 2019. It is a known issue that this version blocks HTTP and HTTPS traffic from consoles. It will be solved in the 2020 version next year, so in the meantime I uninstalled the 2019 version and reinstalled the 2018 version.
Solution 2
I found where the issue is, it's in settings, additional, network, scan encrypted connections. You have to choose not to scan encrypted connections (1rst option in radio button) for the connections to work correctly. Put it back when you are done. No need to uninstall Kaspersky (I did that to verify).
Solution 3
Do you by chance have Comcast Xfinity? I started to receive the same error a couple of days ago and it appears that Xfinity is intercepting traffic and returning a comcast "rules of use" page.
EDIT It appears that their notification system does some shady injection. On a refresh I finally received an actionable notification letting me know I was over my monthly usage and once I acknowledged it, issues subsided.
$ sudo apt update
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Ign:6 http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04 ./ InRelease
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:8 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Hit:9 http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04 ./ Release
Hit:10 http://ppa.launchpad.net/neovim-ppa/stable/ubuntu bionic InRelease
Fetched 163 kB in 1s (164 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Related videos on Youtube
John
Updated on September 18, 2022Comments
-
John almost 2 years
After installing Ubuntu 18.04 from the Windows store I open Bash and want to run
sudo apt-get update
, but this returns the following errors:Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Connection failed [IP: 91.189.91.26 80] Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease Connection failed [IP: 91.189.88.162 80] Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Connection failed [IP: 91.189.88.161 80] Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Connection failed [IP: 91.189.88.162 80] Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 91.189.88.162 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 91.189.88.161 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 91.189.88.162 80] W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Connection failed [IP: 91.189.91.26 80] W: Some index files failed to download. They have been ignored, or old ones used instead.
When I open
91.189.91.26
in a browser, it shows the site without a problem.Previously this worked without any problem, but I did a clean reinstall of Windows and now it doesn't work anymore. It seems some firewall or proxy issue, but I tried with the firewall disabled and I got the same result.
Any idea why this is happening? Maybe it is a 18.04 issue? If so, is it possible to return to 16.04 on Windows 10? Becasue I don't see a uninstall option.
-
NaN over 5 yearsFacing the same problem. Doesn't work on 16.04 either.
-
Amit Chaurasia almost 5 yearsSee this helpful link: answers.launchpad.net/ubuntu/+question/673653 ubuntubuzz.com/2018/03/… Then try upgrading again. sudo apt-get update deb mirror.cse.iitk.ac.in/ubuntu bionic main deb-src mirror.cse.iitk.ac.in/ubuntu bionic main
-
Rob almost 3 yearsIn my case, my employer's VPN was blocking access. Disconnected and updated just fine.
-
-
Paul over 5 yearsYou can exit Kaspersky Total Security version 2019, reload a console, and then
sudo apt-get update
will succeed. I'm experiencing the same problem. My KIS upgraded automatically from 2018 to 2019.