Package install issues - unable to access index for repository - cannot open URL

Using RStudio Server (on Cloudera Quickstart using CentOS) and trying to install and use sparklyr. Get the following error when I run install.packages("sparklyr")

Warning in install.packages
unable to access index for repository http://cran.rstudio.com/src/contrib
cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
Installing package into '/home/cloudera/R/x86_64-redhat-linux-gnu-library/3.5'
(as 'lib' is unspecified)
package 'sparklyr' is not available (for R version 3.5.0)

Any help would be appreciated!

I suspect this is actually where things are going wrong (there’s “no sparklyr available” because install.packages() can’t even access the repo). Note that if you check the PACKAGES URL that it’s failing to access, there’s definitely an entry for sparklyr.

This problem is often the result of proxies, firewalls, or other traffic filtering software blocking R from accessing remote URLs, so maybe start by looking into how your system is set up on that front?

2 Likes