我正在尝试在 OS X 10.12.6 上安装 RCurl,但出现以下错误:
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
这个错误已经讨论了一点,但解决方案都是针对 linux 的,我认为它们与 OS X 无关。我确实尝试安装了
curl
的自制版本|但这没有帮助。有任何想法吗?我认为更多的调试信息会有所帮助,但我不确定还能提供什么。
提前致谢!
缺口
最佳答案
如果有人和我一样在 Ubuntu 中遇到同样的问题,则解决方案首先在终端中运行:
sudo apt-get install libcurl4-gnutls-dev
然后在 R 中:install.packages('RCurl')
关于r - 软件包 ‘RCurl’ 的安装具有非零退出状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45481435/