Failed to update / install packages in R 3.2.2 running in Google Compute Engine (Debian Wheezy)

I created a basic instance in the Google Compute Engine that runs on Debian wheezy. My goal is to install R on an instance and access it remotely via a Jupyter / Ipython laptop.

The problem that I encountered is that after installing R 3.2.2. "Fire Safety" and I try to update the packages with update.packages(), I can’t do this, and I get a warning: unable to access index for repository https://cran.<rest of mirror address>This is regardless of which CRAN mirror I choose (18 mirror options), Similarly, if I try to install basic packages , for example jsonlite , using install.packages('jsonlite'), I get a similar error:

Warning: unable to access index for repository https://cran.cnr.Berkeley.edu/src/contrib Warning message: package ‘jsonlite’ is not available (for R version 3.2.2). Again, this error does not depend on the mirror I selected.

If this helps in the diagnosis, then how I install R, right after creating a new instance, it looks like this:

sudo apt-get update
sudo apt-get upgrade
sudo -i
echo "deb http://cran.r-project.org/bin/linux/debian wheezy-cran3/" > /etc/apt/sources.list.d/cran.list
apt-get update
apt-get upgrade
apt-get install r-base-core r-base-dev

Can anyone suggest what might cause a package update / installation problem?

+4
source share
2 answers

Two quick ideas:

  • Replace httpswith httpfor example. ininstall.packages("digest", repos="http://cran.cnr.berkeley.edu")

  • Switch the repo to the one where we know https is supported, for example. install.packages("digest", repos="https://cran.rstudio.com")

I can use the Berkeley host through http and https, but maybe AWS is blocking port 443?

+6
source

Through the answer to Unix.SE :

apt-transport-https.

deb https://some.server.com/debian stable main

sources.list.

0

All Articles