RStudio server install.packages not working

We installed R and RStudio Server in a Linux Red Hat server.
R version is 3.6.0.
RStudio Sever version is 1.2.5019.
Server is Linux Red Hat 7.7.

I have sterted an RStudio session in: ip:8787 and I tried to install a package:

Installing package into ‘/home/username/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)

Error in library(stringr) : there is no package called ‘stringr’

To try to solve this issue, I have followed the instructions here:

So, I tried to install.packges in R (outside of RStudio) and I am getting the following error:


select CRAN 53

Warning: unable to access index for repository
cannot open URL ''
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
URL '': status was 'Couldn't connect to server'
2: package ‘stringr’ is not available (for R version 3.6.0)

Error in library(stringr) : there is no package called ‘stringr’

Did anyone experience a similar problem before?
Does anyone know what can I do to solve this ussue and install.packages correctly in the Linux Red Hat server?

Thank you in advance.

This seems like a connectivity issue, R is not being able to connect to the CRAN repository you have selected, these are some things to try.

  • Choose a different CRAN repository, RStudio's repository is a good choice ( 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.
1 Like

Thank you. We are having a look at traffic restrictions at work, and hopefully this will solve the issue.

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