Package ‘httpuv’ is not available (for R version 3.5.0)

package-installation

#1

I'm getting errors trying to run a simple dashboard that I have. I'm using RStudio installed through Anaconda Navigator on Ubuntu 18.04.

When I click 'Run App' I get the following error message:

Error: package ‘httpuv’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

So I go the '/Anaconda/envs/rstudio/lib/R/library' and delete the folder 'httpuv'.

I then do > install.packages("httpuv")

And then I get the error messages:

Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘httpuv’ is not available (for R version 3.5.0)

I'm a noob in RStudio, but what should I do now? Can I roll back the version of R that RStudio/Anaconda Navigator is using?


#2

Hi Falc! Welcome!

It looks like the installation is failing because R can’t connect to CRAN, which results in R claiming that httpuv isn’t available, but really what happened is that R wasn’t even able to search the repository in the first place. A couple of possible root causes to investigate:

  • You weren’t connected to the internet when you tried this
  • Something is blocking R’s connection to the internet, typically a firewall, proxy, or other internet filtering software

#3

Hi, thanks for your reply.

Its very strange though, I am definitely connected to the internet, and I cant think of anything that would be blocking R's connection to the internet. I'm on my home computer, so its not like there is a university or business firewall.

If try to browse 'https://cran.rstudio.com/src/contrib/PACKAGES' with chrome browser, it works just fine. Could it be something related to anaconda navigator?