Issue while installing packages on redhat machine and on RStudio server

rstudio

#1

Hello,

I have installed the latest version of R on redhat machine but unable to install packages after it. It's taking a long time to choose appropriate cran option mirror to get install packages. Once I selected the cran mirror option and trying to install the packages but it showing me the error.

Same I have tried on RStudio server too but CRAN option mirror is not showing any options.
Issue 1)

Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib:
  cannot open URL '<<link>>'
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
  URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'Couldn't connect to server'

Issue 2) I have attached the screenshot of same.(RStudio server error)

Thanks and Regards,
Lavish Patodi

!(upload://jVBPYVJPyL0tc18HljdT2n6XdkU.png)


#2

Your screenshot didn't appear. You can re-edit your original post if you'd like us to have a look.

A few ideas;

  1. Double check your machine can connect to the internet. Use r to download a dataset.

  2. Select a cran mirror explicitly,

install.packages("tidyverse", repos = "http://cran.rstudio.com")
  1. You can change the cran repo url with the options() function. Some discussion on SO here.