Issue while installing packages on redhat machine and on RStudio server




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
  cannot open URL '<<link>>'
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
  URL '': status was 'Couldn't connect to server'

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

Thanks and Regards,
Lavish Patodi



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 = "")
  1. You can change the cran repo url with the options() function. Some discussion on SO here.