问题
When I run the following code involving the RAdwords package, I get an error which seems to be related to certificates. Is there a simple solution to this?
library(RAdwords)
google_auth <- doAuth()
Error in function (type, msg, asError = TRUE) : server certificate verification failed. CAfile: /home/pavel/R/x86_64-pc-linux-gnu-library/3.2/RCurl/CurlSSL/ca-bundle.crt CRLfile: none
The error occurs on Ubuntu 14.04, R 3.2.0, RCurl 1.95-4.5, and RAdwords 0.1.4.
回答1:
I had the same issue on Ubuntu 14.04, but manually downloading (and overriding the RCurl
shipped version of) the cacert.pem
from the cURL homepage resolved the issue. I know it's an ugly workaround :)
回答2:
I had this problem too. Try testing whether RCurl is working for any https URL.
getURL("https://stat.ethz.ch")
If it's not working then most likely you need to install the curl-dev package:
$ sudo apt-get install libcurl4-openssl-dev
And then reinstall RCurl:
install.packages("RCurl")
The FAQ for RCurl was helpful here.
回答3:
Overriding RCurl shiped ca-bundle.crt with latest from curl works for me.
wget https://curl.haxx.se/ca/cacert.pem -O "/usr/local/lib/R/site-library/RCurl/CurlSSL/ca-bundle.crt"
In your case:
wget https://curl.haxx.se/ca/cacert.pem -O "/home/pavel/R/x86_64-pc-linux-gnu-library/3.2/RCurl/CurlSSL/ca-bundle.crt"
来源:https://stackoverflow.com/questions/29806412/radwords-error-server-certificate-verification-failed