R-3.2.1 unable to load shared object internet.so

2020-03-12 04:00发布

问题:

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

回答1:

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