rmacosrcurl

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


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


Solution

  • 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: