Three days ago I could install packages without any problems on three different systems. R was rebuilt on all three systems (Gentoo forced a rebuild) and now I'm unable to download and install from CRAN on any of them....
> install.packages('rmarkdown')
Warning: unable to access index for repository https://r-forge.r-project.org/src/contrib:
internet routines cannot be loaded
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
internet routines cannot be loaded
Warning: unable to access index for repository https://cran.uk.r-project.org/src/contrib:
internet routines cannot be loaded
These are the three repositories I define in .Rprofile
...
## Set CRAN mirrors
local({r <- getOption("repos"); r["CRAN"] <- "https://cran.uk.r-project.org"; options(repos=r)})
options(repos=c(RStudio='https://rstudio.org/_packages', getOption('repos')))
options(repos=c(RStudio='https://cran.rstudio.com/', getOption('repos')))
And for full information..
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Gentoo/Linux
locale:
[1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C
[3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8
[5] LC_MONETARY=en_GB.utf8 LC_MESSAGES=en_GB.utf8
[7] LC_PAPER=en_GB.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.10.0
loaded via a namespace (and not attached):
[1] memoise_1.0.0 digest_0.6.9
Searching I've found several threads on this. The first two are just where mirrors are down or mis-specified because https was not supported...
- Unable to access index for repository http://mirrors.dotsrc.org/cran/src/contrib
- R - Warning: unable to access index for repository
...neither of which are the problem here since I'm using mirrors which are up (e.g.). I then came across the two following threads (one references the other)...
- R-3.2.1 unable to load shared object internet.so
- Error in install.packages: internet routines cannot be loaded using StatET while it works in R console
There is also reference to a thread on R-help from November last year.
Reading these its seems the problem could be one of a few things...
- A problem with
LD_LIBRARY_PATH
not being set in my systems environment. - A problem with SSL support.
Problem with LD_LIBRARY_PATH
Checking this I get across my three systems...
> Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/lib64/R/lib:/usr/lib64/blas/reference:/usr/lib64/lapack/reference"
> Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/lib64/R/lib:/usr/lib64/blas/reference:/usr/lib64/lapack/reference:/etc/java-config-2/current-system-vm/jre/lib/amd64/server"
> Sys.getenv("LD_LIBRARY_PATH")
[1] "/usr/lib64/R/lib:/usr/lib64/blas/reference:/usr/lib64/lapack/reference:/etc/java-config-2/current-system-vm/jre/lib/amd64/server"
So R can find its own libraries ok. This suggests its perhaps the other problem SSL support
Problem with SSL Support
I found someone else who'd had this problem (see here) so I checked whether Curl could access the URLs and therefore had SSL support...
# curl https://cran.rstudio.com/src/contrib/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /src/contrib</title>
</head>
<body>
<h1>Index of /src/contrib</h1>
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/back.gif" alt="[DIR]"></td><td><a href="/src/">Parent Directory</a></td><td> </td><td align="right"> - </td><td> </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="00Archive/">00Archive/</a></td><td align="right">03-Mar-2016 04:50 </td><td align="right"> - </td><td> </td></tr>
....
So it looks like Curl is working ok and I can access the URLs but R can't.
Any pointers on how to resolve this would be welcome as I can't figure it out.
Thanks in advance.