问题
Since upgrading to OS X Yosemite 10.10.2, I have been unable to use RCurl to send POSTs via SSL. The error message I get is:
Error in function (type, msg, asError = TRUE) :
SSLRead() return error -9806
This strongly resembles the curl error here: osx 10.10 Curl POST to HTTPS url gives SSLRead() error
So I ran the instructions to install libcurl via home-brew, per the answers on that question, but I cannot figure out how to link RCurl to the new libcurl. curl-config still returns the old installation of libcurl.
> packageVersion("RCurl")
[1] ‘1.95.4.5’
> version
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 1.2
year 2014
month 10
day 31
svn rev 66913
language R
version.string R version 3.1.2 (2014-10-31)
nickname Pumpkin Helmet
回答1:
Figured it out!
First, I installed brew from homebrew:
brew install --with-libressl curl
Then, I copied the curl-config in place:
sudo cp /usr/bin/curl-config /usr/bin/curl-config.bak
sudo cp /usr/local/opt/curl/bin/curl-config /usr/bin/curl-config
Then, I reinstalled RCurl:
install.packages("RCurl", type="source")
And it worked again.
来源:https://stackoverflow.com/questions/28506568/how-do-i-get-rcurl-to-connect-to-post-ssl-on-os-x-yosemite