I have created a basic instance on Google Compute Engine running on Debian wheezy. My objective is to install R on an instance and access it remotely via Jupyter/Ipython notebook.
The problem I am facing is that once I install R 3.2.2. "Fire Safety" and I try to update the packages using update.packages()
, I am unable to do so and I get a Warning stating: unable to access index for repository https://cran.<rest of mirror address>
This is irrespective of which CRAN mirror I choose (18 mirror options). Similarly, if I try to install basic packages like 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 is irrespective of the mirror I choose.
If it helps in any way for the diagnosis, the way I am installing R, right after a fresh instance is created, goes as follows:
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 be causing this update/install package problem?
Two quick ideas:
Replace the https
with http
, e.g. in install.packages("digest", repos="http://cran.cnr.berkeley.edu")
Switch the repo to one where we know https is supported, e.g. install.packages("digest", repos="https://cran.rstudio.com")
I can use the Berkeley host via both http and https, but maybe AWS blocks port 443?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With