installation of package ‘RCurl’ had non-zero exit status

依然范特西╮ 提交于 2019-12-13 13:59:33

问题


I am trying to install RCurl on OS X 10.12.6 but get the following error:

Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/nick/Library/R/3.4/library/RCurl/libs/RCurl.so':
  dlopen(/Users/nick/Library/R/3.4/library/RCurl/libs/RCurl.so, 6): Library not loaded: @rpath/libcurl.4.dylib
  Referenced from: /Users/nick/Library/R/3.4/library/RCurl/libs/RCurl.so
  Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/nick/Library/R/3.4/library/RCurl’

The downloaded source packages are in
    ‘/private/var/folders/hx/9xx9fwq91t95k45dzlmzxfy40000gp/T/Rtmp14zSi1/downloaded_packages’
Warning message:
In install.packages("RCurl") :
  installation of package ‘RCurl’ had non-zero exit status

This error has been discussed a bit already, but the solutions are all specific to linux and I don't think they are relevant to OS X. I did try installing the homebrew version of curl but that didn't help.

Any ideas? I think that more debugging information would be helpful, but I'm not sure what else to provide.

Thanks in advance! Nick


回答1:


Looks like it's expecting libcurl.4.dylib in your @rpath.

I think others have encountered the same issue so the solution should be in here somewhere:

  • brew unlink R solution
  • Install curl again



回答2:


In case it is useful for anyone else with this issue, I solved it without having to install the cran binary of R. (I use the homebrew version because it allows you to use faster BLAS options that take advantage of parallelism). Steps were:

  1. Make sure that R doesn't find the homebrew or anaconda versions of curl-config (this will only affect the current R session)

    PATH=/usr/bin/:$PATH
    
  2. Download and install latest version of RCurl from http://www.omegahat.net/RCurl/ (replace <RCURLVERSION> with the current latest version)

    wget http://www.omegahat.net/RCurl/RCurl_<RCURLVERSION>.tar.gz
    R CMD INSTALL RCurl_<RCURLVERSION>.tar.gz
    


来源:https://stackoverflow.com/questions/45481435/installation-of-package-rcurl-had-non-zero-exit-status

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!