Error installing R packages in AWS instance

I have recently started using AWS servers to launch R instances.

However, I can't seem to install these following packages : flexdashboard and leaflet.

> install.packages("flexdashboard")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Warning in install.packages :
  package ‘flexdashboard’ is not available (for R version 3.6.0)

and

> install.packages("leaflet")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Warning in install.packages :
  package ‘leaflet’ is not available (for R version 3.6.0)
```
Sorry if this is a stupid question, I am not familiar with AWS or Linux environments
Thank you for your help

I am not familiar with this error; perhaps somebody else will be?

But I know you can sidestep the issue by downloading the tarfiles of the packages, and installing them manually (this may not be practical for many packages at once, but two are doable).

Just remember to click on the rolldown in manual install window:

save tar.gz

The tarballs can be had here:
https://cran.r-project.org/src/contrib/leaflet_2.0.3.tar.gz
https://cran.r-project.org/src/contrib/flexdashboard_0.5.1.1.tar.gz

Very helpful indeed.
Unfortunately I have to install the dependencies of each packages.
It's gonna take a while but I'l work it out.

Thank you !

If anybody has the more "aesthetic" answer I'll take it as well

Does this happen with other packages? This is a connectivity issue of some kind, you could try changing to other CRAN mirror geographically closer to your AWS region.

These are some things to try.

  • Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.
  • Disable secure download setting.
  • Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.