1

I'm attempting to install the latest version of R (currently on v 3.0.2) on Ubuntu Server 14.04, and as suggested by this post I've edited the /etc/apt/sources.list to include the following line:

 deb http://cran.rstudio.com/bin/linux/ubuntu trusty universe

When I try to update the list of packages though, I get the following error

Err http://cran.rstudio.com trusty/universe amd64 Packages
  404  Not Found
Err http://cran.rstudio.com trusty/universe i386 Packages
  404  Not Found

W: Failed to fetch http://cran.rstudio.com/bin/linux/ubuntu/dists/trusty/universe/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://cran.rstudio.com/bin/linux/ubuntu/dists/trusty/universe/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

If I add a trailing forward slash to trusty, or remove universe in keeping with this format as shown below:

deb http://cran.rstudio.com/bin/linux/ubuntu trusty/

I get

E: Malformed line 49 in source list /etc/apt/sources.list (absolute dist)
E: The list of sources could not be read.

I thought maybe when apt-get upgrade accesses the sources.list it may be misformatting the url for the CRAN repository, because including /dists/trusty/universe/ doesn't seem right to me, but I don't know if that is the actual issue, or what to do about it.

joeqesi
  • 61
  • I don't understand. Where did you get the http://mirrors.ebi.ac.uk/CRAN/ from? What makes you think that's an Ubuntu repository (doesn't look like one). That's not what my answer to the question you linked to was suggesting. – terdon Mar 24 '17 at 10:58
  • @terdon http://mirrors.ebi.ac.uk/CRAN/ is one of the mirrors for CRAN in the UK. I also tried http://cran.rstudio.com/bin/linux/ubuntu and that didn't work either. – joeqesi Mar 24 '17 at 11:20
  • 1
    It should be deb http://mirrors.ebi.ac.uk/CRAN/bin/linux/ubuntu trusty/ I think. The trailing slash is important - see List of sources can not be read Ubuntu 16.04 – steeldriver Mar 24 '17 at 11:25
  • @joeqesi yes, I know it's a CRAN mirror. You're treating it as an Ubuntu repository though, not a CRAN mirror! If it fails when using http://cran.rstudio.com/bin/linux/ubuntu, that's a very different situation, but that it fails with mirrors.ebi.ac.uk is normal since that's not a repository. – terdon Mar 24 '17 at 11:38
  • @terdon my mistake. However, I've just tried updating again with http://mirrors.ebi.ac.uk/CRAN/bin/linux/ubuntu which did not work, and then tried updating with http://cran.rstudio.com/bin/linux/ubuntu which didn't work. – joeqesi Mar 24 '17 at 11:43
  • @steeldriver whenever I add the trailing slash to trusty I can't run apt-get upgrade as it considers the line to be malformed. – joeqesi Mar 24 '17 at 11:44
  • OK, then please [edit] your question to reflect that. You may as well remove the mirrors.ebi.ac.uk stuff since it makes sense that that would fail. Just edit it and show us the line you added for the cran.rstudio.com and the error you got when trying to use it. – terdon Mar 24 '17 at 11:44
  • @terdon the http://mirrors.ebi.ac.uk/CRAN/bin/linux/ubuntu mirror appears to work - at least for xenial/ (don't have a trusty box I can test it on) – steeldriver Mar 24 '17 at 11:57
  • @steeldriver ah, yes, I hadn't checked the /bin subdir, I just saw that mirrors.ebi.ac.uk/CRAN/ was a regular mirror site and not a repo. – terdon Mar 24 '17 at 11:58

0 Answers0