R-3.2.1 unable to load shared object internet.so
Asked Answered
R

1

10

I am unable to install packages from CRAN after upgrading R from 3.1.3 to 3.2.1. The error message is that the shared object internet.so cannot be loaded.

install.packages("randomForest")
Installing package into ‘/gs/project/feb-684-aa/BIF/R/R-3.2.1/library’ (as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in url("http://cran.r-project.org/CRAN_mirrors.csv") : 
  internet routines cannot be loaded
In addition: Warning message:
In url("http://cran.r-project.org/CRAN_mirrors.csv") :
  unable to load shared object '/software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so':
  /software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so: undefined symbol: curl_multi_wait
> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: CentOS release 6.5 (Final)

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] nvimcom_0.9-8

loaded via a namespace (and not attached):
[1] tools_3.2.1

[blancha@lg-1r17-n04 BIF]$ ls /software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so -l
-rwxrwxr-x 1 blancha feb-684-01 275221 Jul 12 09:47 /software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so

The following post appears to address a similar issue. Error in install.packages: internet routines cannot be loaded using StatET while it works in R console

Ripley answered 12/7, 2015 at 14:25 Comment(5)
How did you install R? Via the official package repositories? It seems that your installed version of R is incompatible with the installed version of curl. More specifically, R requires a curl function, curl_multi_wait, which seems to have been introduced in curl around 2013. Your version of curl might be older than that.Hygiene
The minimum version of curl/libcurl should be 7.28.0, as per the documentation. Which version do you have installed?Hygiene
I had curl version 7.35 installed. I updated to 7.43, and reinstalled R-3.2.1. I still get exactly the same error version. R-3.2.1 was downloaded from CRAN. I was installed from the source package. wget cran.utstat.utoronto.ca/src/base/R-3/R-3.2.1.tar.gzRipley
wget cran.utstat.utoronto.ca/src/base/R-3/R-3.2.1.tar.gz tar xzvf R-3.2.1.tar.gz;mv R-3.2.1 build; mkdir R-3.2.1 configure --prefix=/software/areas/ircm/tools/R-3.2.1;make;make installRipley
[blancha@lg-1r17-n03 build]$ curl --version curl 7.43.0 (x86_64-unknown-linux-gnu) libcurl/7.43.0 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18Ripley
R
3

Fixed! Thank you @David Robinson for your suggestions. They put me on the right track.

I just added the following command to my .bash_profile, and the problem was solved:

export LD_LIBRARY_PATH=$TOOLS/curl-7.43.0/lib:$LD_LIBRARY_PATH
Ripley answered 12/7, 2015 at 16:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.