I am trying to run sudo apt-get update
, which I understand to be a prerequisite step to update R with the command sudo apt-get install r-base
.
I get as far as this, and then it gets stuck:
Hit:1 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://cran.rstudio.com/bin/linux/ubuntu xenial/ InRelease
Hit:3 http://ppa.launchpad.net/marutter/rrutter/ubuntu xenial InRelease
Get:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease
Get:6 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:7 http://gb.archive.ubuntu.com/ubuntu xenial-security InRelease
Hit:8 https://cran.ma.imperial.ac.uk/bin/linux/ubuntu bionic-cran40/ InRelease
0% [Connecting to cran.stat.ucla.edu (128.97.86.247)]
After a couple of minutes I get the message Could not connect to cran.stat.ucla.edu:80 (128.97.86.247), connection timed out
My internet connection seems okay.
Based on answers to similar questions, I have tried sudo apt --fix-broken install
- this runs very quickly and gives the last line 0 to upgrade, 0 to newly install, 0 to remove and 9 not to upgrade
. Based on answers to this question, I have tried changing the download server from the default United Kingdom to the 'select best server' recommended http://ubuntu.mirrors.ovh.net/ubuntu, and back again, and I have tried adding -o Acquire::ForceIPv4=true
after the apt-get
command. Changing the download server changes the list of Hits and Gets, but it still gets stuck connecting to cran.stat.ucla.edu.
deb https://www.stats.bris.ac.uk/R/bin/linux/ubuntu xenial-cran40/
in /etc/apt/sources.list , and saving. After appearing to access the Bristol mirror,sudo apt-get update
still tries to connect to cran.stat.ucla.edu:80 and gets stuck. – Cenlle Jul 24 '20 at 11:28