0

As per the documentation given on the page http://ftp.iitm.ac.in/cran/

I tried to install the latest R package v3.2.2 on my system(32-bit).

I have added

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

deb-src http://cran.rstudio.com/ubuntu trusty/

in package source list but when i run

sudo apt-get update

command the update gets failed for the newly added sources.

Fetched 1,384 kB in 42s (32.4 kB/s)
W: Failed to fetch http://cran.rstudio.com/ubuntu/dists/trusty/universe/source/Sources  404  Not Found

W: Failed to fetch http://cran.rstudio.com/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.

How to install the v3.2.2 package on my system?

2

Judging from https://cran.r-project.org/bin/linux/ubuntu/, the correct url seems to be

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

The information on your page seems to be outdated.

Edit: In order to install packages from this repository, you'll need to add the public key they're signed with. Most conveniently, this is done with the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

This is also described in the link above. If this procedure does not work, please read the point Secure APT

  • After modifying the sources.list with the mentioned "deb cran.rstudio.com/bin/linux/ubuntu trusty/" and then perform the sudo apt-get update, i am getting the following error: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9. How to resolve the error? It seems that my network firewall is blocking this port for access, but how to resolve it? – Sanjeev Sep 14 '15 at 6:08
  • You need to add the public key of this repository. I edited my answer accordingly. – panmari Sep 14 '15 at 6:54
  • After getting the key using sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 when did the sudo apt-get update , while updating the index for cran.rstudio.com trusty/ , i am getting the timeout error. – Sanjeev Sep 14 '15 at 12:58
  • I am getting the following error while running the apt-get update Err cran.rstudio.com trusty/ Packages Connection timed out after 120001 milliseconds W: Failed to fetch cran.rstudio.com/bin/linux/ubuntu/trusty/Packages Connection timed out after 120001 milliseconds E: Some index files failed to download. They have been ignored, or old ones used instead. Even i have very good internet connection. – Sanjeev Sep 14 '15 at 14:02
  • Finally the solution worked. Now able to install the v3.2.2 R package . Thanks. – Sanjeev Sep 16 '15 at 10:01

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.