Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL certificate problem: unable to get local issuer certificate #122

Closed
arthur1616 opened this issue Sep 25, 2017 · 27 comments
Closed

SSL certificate problem: unable to get local issuer certificate #122

arthur1616 opened this issue Sep 25, 2017 · 27 comments

Comments

@arthur1616
Copy link

arthur1616 commented Sep 25, 2017

Hello, I'm using quantmod to fetch data from Yahoo Finance. But whenever I run it, it gives me this error:
SSL certificate problem: unable to get local issuer certificate

This only happens when I logged in my company's VPN and it works perfectly if I connect my company's laptop to another network.

Btw, set ssl_verifypeer = 0L doesn't work because quantmod seems to have a bug which cannot convey curl global settings to its function. Here's that issue: joshuaulrich/quantmod#177

My question is, is there any way for me to disable the SSL verification to make it work for quantmod ?

PS: My question on Stackoverflow, which contains more specified information.

https://stackoverflow.com/questions/46331066/quantmod-ssl-unable-to-get-local-issuer-certificate-in-r

Thank you!!!

@jeroen
Copy link
Owner

jeroen commented Sep 25, 2017

Can you try installing this special build of curl. Run in a clean R session:

Sys.setenv(LIBCURL_BUILD="winssl")
devtools::install_github('jeroen/curl')

And give me the output?

@arthur1616
Copy link
Author

Thank you for your reply! Here is the error code:

Error in curl::curl_fetch_disk(url, x$path, handle = handle) :
SSL certificate problem: unable to get local issuer certificate

@jeroen
Copy link
Owner

jeroen commented Sep 25, 2017

Did you install the special build above? What is your output for curl_version()?

@arthur1616
Copy link
Author

Hi I ran your code to install that special build and it gave me the error code above.

output for curl_version()

$version
[1] "7.54.1"

$ssl_version
[1] "OpenSSL/1.0.2l"

$libz_version
[1] "1.2.8"

$libssh_version
[1] "libssh2/1.8.0"

$libidn_version
[1] NA

$host
[1] "x86_64-w64-mingw32"

$protocols
[1] "dict" "file" "ftp" "ftps" "gopher" "http" "https" "imap"
[9] "imaps" "ldap" "ldaps" "pop3" "pop3s" "rtsp" "scp" "sftp"
[17] "smtp" "smtps" "telnet" "tftp"

$ipv6
[1] TRUE

$http2
[1] FALSE

$idn
[1] TRUE

@jeroen
Copy link
Owner

jeroen commented Sep 25, 2017

Ah so you can't even connect to github. Can you try this then?

Sys.setenv(LIBCURL_BUILD="winssl")
install.packages("https://github.com/jeroen/curl/archive/master.tar.gz", repos = NULL)

@arthur1616
Copy link
Author

arthur1616 commented Sep 25, 2017

I think it failed:

Installing package into ‘C:/Users/E30545/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://github.com/jeroen/curl/archive/master.tar.gz'
Content type 'application/x-gzip' length unknown
downloaded 87 KB

Warning in untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
* installing *source* package 'curl' ...
** libs

*** arch - i386
Building curl with 'winssl' crypto backend.
rm -f curl.dll callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o reflist.o split.o utils.o version.o winidn.o libwinhttp.dll.a winhttp.def
"C:/PROGRA~1/R/R-3.4.1/bin/i386/Rscript.exe" --vanilla "../tools/winlibs.R"
echo '#include <curl/curl.h>' | c:/Rtools/mingw_32/bin/gcc  -E -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB -std=gnu99 -xc - | grep "^[ \t]*CURLOPT_.*," | sed s/,// > ../tools/option_table.txt
cp winhttp32.def.in winhttp.def
c:/Rtools/mingw_32/bin/dlltool --as c:/Rtools/mingw_32/bin/as  -k  --dllname winhttp.dll --input-def winhttp.def --output-lib libwinhttp.dll.a
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c callbacks.c -o callbacks.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c curl.c -o curl.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c download.c -o download.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c escape.c -o escape.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c fetch.c -o fetch.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c form.c -o form.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c getdate.c -o getdate.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c handle.c -o handle.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c ieproxy.c -o ieproxy.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c init.c -o init.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c interrupt.c -o interrupt.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c multi.c -o multi.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c nslookup.c -o nslookup.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c reflist.c -o reflist.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c split.c -o split.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c utils.c -o utils.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c version.c -o version.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c winidn.c -o winidn.o
c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o curl.dll tmp.def callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o reflist.o split.o utils.o version.o winidn.o -L../windows/libcurl-7.54.1/lib-winssl/i386 -L. -lwinhttp -lcurl -lz -lws2_32 -lcrypt32 -lwldap32 -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-3.4.1/bin/i386 -lR
installing to C:/Users/E30545/Documents/R/win-library/3.4/curl/libs/i386

*** arch - x64
Building curl with 'winssl' crypto backend.
rm -f curl.dll callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o reflist.o split.o utils.o version.o winidn.o libwinhttp.dll.a winhttp.def
"C:/PROGRA~1/R/R-3.4.1/bin/x64/Rscript.exe" --vanilla "../tools/winlibs.R"
echo '#include <curl/curl.h>' | c:/Rtools/mingw_64/bin/gcc  -E -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB -std=gnu99 -xc - | grep "^[ \t]*CURLOPT_.*," | sed s/,// > ../tools/option_table.txt
cp winhttp64.def.in winhttp.def
c:/Rtools/mingw_64/bin/dlltool --as c:/Rtools/mingw_64/bin/as  -k  --dllname winhttp.dll --input-def winhttp.def --output-lib libwinhttp.dll.a
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c callbacks.c -o callbacks.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c curl.c -o curl.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c download.c -o download.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c escape.c -o escape.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c fetch.c -o fetch.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c form.c -o form.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c getdate.c -o getdate.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c handle.c -o handle.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c ieproxy.c -o ieproxy.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c interrupt.c -o interrupt.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c multi.c -o multi.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c nslookup.c -o nslookup.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c reflist.c -o reflist.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c split.c -o split.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c utils.c -o utils.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c version.c -o version.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-3.4.1/include" -DNDEBUG -I../windows/libcurl-7.54.1/include -DCURL_STATICLIB    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c winidn.c -o winidn.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o curl.dll tmp.def callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o reflist.o split.o utils.o version.o winidn.o -L../windows/libcurl-7.54.1/lib-winssl/x64 -L. -lwinhttp -lcurl -lz -lws2_32 -lcrypt32 -lwldap32 -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-3.4.1/bin/x64 -lR
installing to C:/Users/E30545/Documents/R/win-library/3.4/curl/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\curl.dll to C:\Users\E30545\Documents\R\win-library\3.4\curl\libs\x64\curl.dll: Permission denied
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
Error: package or namespace load failed for 'curl' in FUN(X[[i]], ...):
 no such symbol R_multi_fdset in package C:/Users/E30545/Documents/R/win-library/3.4/curl/libs/x64/curl.dll
Error: loading failed
Execution halted
ERROR: loading failed for 'x64'
* removing 'C:/Users/E30545/Documents/R/win-library/3.4/curl'
* restoring previous 'C:/Users/E30545/Documents/R/win-library/3.4/curl'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying C:\Users\E30545\Documents\R\win-library\3.4\00LOCK-curl-master\curl\libs\x64\curl.dll to C:\Users\E30545\Documents\R\win-library\3.4\curl\libs\x64\curl.dll: Permission denied
Warning messages:
1: running command '"C:/PROGRA~1/R/R-3.4.1/bin/x64/R" CMD INSTALL -l "C:\Users\E30545\Documents\R\win-library\3.4" "C:/Users/E30545/AppData/Local/Temp/RtmpKExcvI/downloaded_packages/master.tar.gz"' had status 1 
2: In install.packages("https://github.com/jeroen/curl/archive/master.tar.gz",  :
  installation of package ‘C:/Users/E30545/AppData/Local/Temp/RtmpKExcvI/downloaded_packages/master.tar.gz’ had non-zero exit status

@jeroen
Copy link
Owner

jeroen commented Sep 25, 2017

It is important that you run this in a clean r session while the curl package is not loaded. Otherwise it cannot replace the dll while it is in use.

@arthur1616
Copy link
Author

arthur1616 commented Sep 25, 2017

Sorry, now the code works. Here's the tail:

** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (curl)

@jeroen
Copy link
Owner

jeroen commented Sep 25, 2017

OK great. What is your curl_version()? Has this solved your problem?

@arthur1616
Copy link
Author

arthur1616 commented Sep 25, 2017

Come on man! How did you solve it ??? This problem has tortured me for weeks!

$version
[1] "7.54.1"

$ssl_version
[1] "WinSSL"

$libz_version
[1] "1.2.8"

$libssh_version
[1] NA

$libidn_version
[1] NA

$host
[1] "x86_64-w64-mingw32"

$protocols
[1] "dict" "file" "ftp"
[4] "ftps" "gopher" "http"
[7] "https" "imap" "imaps"
[10] "ldap" "ldaps" "pop3"
[13] "pop3s" "rtsp" "smtp"
[16] "smtps" "telnet" "tftp"

$ipv6
[1] TRUE

$http2
[1] FALSE

$idn
[1] TRUE

@jeroen
Copy link
Owner

jeroen commented Sep 25, 2017

This version of curl uses the windows native ssl implementation. We might switch to this as the default later in the year. Good to know this solves your issue.

@arthur1616
Copy link
Author

Thank you brother!!!

@jeroen
Copy link
Owner

jeroen commented Oct 6, 2017

Hi @arthur1616 could you do me a favor and test if this now (still) works for you with curl version 3.0 from CRAN?

Just run: install.packages("curl") and show me your output for curl_version() and test if everything works as it did above. Thanks!!

@arthur1616
Copy link
Author

arthur1616 commented Oct 10, 2017

@jeroen

Sorry for the late reply, here's the output:

$version
[1] "7.56.0"

$ssl_version
[1] "(OpenSSL/1.1.0f) WinSSL"

$libz_version
[1] "1.2.8"

$libssh_version
[1] NA

$libidn_version
[1] NA

$host
[1] "x86_64-w64-mingw32"

$protocols
[1] "dict" "file" "ftp"
[4] "ftps" "gopher" "http"
[7] "https" "imap" "imaps"
[10] "ldap" "ldaps" "pop3"
[13] "pop3s" "rtsp" "smtp"
[16] "smtps" "telnet" "tftp"

$ipv6
[1] TRUE

$http2
[1] FALSE

$idn
[1] TRUE

It works for me!

@jeroen
Copy link
Owner

jeroen commented Oct 10, 2017

Great, thanks!

@akashagte
Copy link

akashagte commented Dec 4, 2017

hello @jeroen, i am facing a similar issue, which was non-existent just past week. I tried implementing the approaches below, and they didn't return any Error messages but I am still having errors when I run the getData statement:

Approaches Implemented:
[1]
Sys.setenv(LIBCURL_BUILD="winssl")
install.packages("https://github.com/jeroen/curl/archive/master.tar.gz", repos = NULL)

[2]
install.packages("curl")

Error on running this R snippet: getData(clientCustomerId = awaccid, google_auth = google_auth, statement = uac)

Error in function (type, msg, asError = TRUE) : SSL certificate problem: unable to get local issuer certificate

Could you provide a solution for the same?

@jeroen
Copy link
Owner

jeroen commented Dec 4, 2017

What is your setup? Are you behind a corporate proxy? Where is the getData function?

@akashagte
Copy link

akashagte commented Dec 5, 2017

I am running the R script, which has the getData function, indeed via a corporate proxy

On a windows machine and with R studio

@googlogmob
Copy link

Yesterday got same issue
How to run
Sys.setenv(LIBCURL_BUILD="winssl") install.packages("https://github.com/jeroen/curl/archive/master.tar.gz", repos = NULL)
in a clean r session while the curl package is not loaded?

I got the same @arthur1616 error:

`Предупреждение в untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers

  • installing source package 'curl' ...
    Предупреждение: работающая команда 'sh ./configure.win' имеет статус 127
    ERROR: configuration failed for package 'curl'
  • removing 'C:/Program Files/Microsoft SQL Server/MSSQL13.MRK/R_SERVICES/library/curl'
  • restoring previous 'C:/Program Files/Microsoft SQL Server/MSSQL13.MRK/R_SERVICES/library/curl'
    Предупреждения:
    1: работающая команда '"C:/PROGRA1/MICROS2/MSSQL13.MRK/R_SERV2/bin/x64/R" CMD INSTALL -l "C:\Program Files\Microsoft SQL Server\MSSQL13.MRK\R_SERVICES\library" "C:/Users/SUPERA1/AppData/Local/Temp/2/RtmpwJBx0g/downloaded_packages/master.tar.gz"' имеет статус 1
    2: В install.packages("https://github.com/jeroen/curl/archive/master.tar.gz", :
    установка пакета ‘C:/Users/SUPERA~1/AppData/Local/Temp/2/RtmpwJBx0g/downloaded_packages/master.tar.gz’ имеет ненулевой статус выхода
    `

@dmi3kno
Copy link

dmi3kno commented Sep 12, 2018

@jeroen, is there a way to pass --ssl-no-revoke option to curl (ideally set it by default)?

@jeroen
Copy link
Owner

jeroen commented Sep 12, 2018

On Windows this already is the default: https://github.com/jeroen/curl/blob/master/src/handle.c#L133-L135

@poorvasei
Copy link

poorvasei commented Jun 4, 2019

Hi @jeroen , I'm facing the same error but in ubuntu 16.04.
`$version
[1] "7.47.0"

$ssl_version
[1] "OpenSSL/1.0.2g"

$libz_version
[1] "1.2.8"

$libssh_version
[1] NA

$libidn_version
[1] "1.32"

$host
[1] "x86_64-pc-linux-gnu"

$protocols
[1] "dict" "file" "ftp" "ftps" "gopher" "http" "https" "imap" "imaps" "ldap" "ldaps" "pop3"
[13] "pop3s" "rtmp" "rtsp" "smb" "smbs" "smtp" "smtps" "telnet" "tftp"

$ipv6
[1] TRUE

$http2
[1] FALSE

$idn
[1] TRUE`

this is my curl_version() output but I'm wondering why it is different from my "openssl version" command output in ubuntu terminal.
my terminal output is:
OpenSSL 1.0.2n 7 Dec 2017

If anything is not clear please let me know.

Can you please help me?
thank you in advance.

@jeroen
Copy link
Owner

jeroen commented Jun 4, 2019

Can you add code please to show what it is you are doing exactly.

@poorvasei
Copy link

I'm using fromJSON function from jsonlite package to scrape a url. the url is:
"https://search.codal.ir/api/search/v1/q?PageNumber=1&Symbol=سپ&Subject=%20&CompanyState=0&LetterType=6&TracingNo=-1&LetterCode=%20&FromDate=1397/09/01&ToDate=1398/03/13&AuditorRef=-1&YearEndToDate=&Publisher=false&Mains=true&Childs=false&Audited=true&NotAudited=true&Length=-1&Consolidatable=true&NotConsolidatable=true&CompanyType=1&Category=1"

@jdonnell01
Copy link

Hello, I am facing the same issue on Ubuntu. Has anyone been able to solve this issue?
Output from curl_version():

$version
[1] "7.66.0"

$ssl_version
[1] "OpenSSL/1.1.1d"

$libz_version
[1] "1.2.11"

$libssh_version
[1] "libssh2/1.8.0"

$libidn_version
[1] "2.2.0"

$host
[1] "x86_64-pc-linux-gnu"

$protocols
 [1] "dict"   "file"   "ftp"    "ftps"   "gopher" "http"   "https"  "imap"
 [9] "imaps"  "ldap"   "ldaps"  "pop3"   "pop3s"  "rtmp"   "rtsp"   "scp"
[17] "sftp"   "smb"    "smbs"   "smtp"   "smtps"  "telnet" "tftp"

$ipv6
[1] TRUE

$http2
[1] TRUE

$idn
[1] TRUE

@TommyZzk
Copy link

when I do the install.packages('curl'), and then curl_version(), it shows
Error in curl_version() : could not find function "curl_version"
I have trouble getting data from the github as well

@bttomio
Copy link

bttomio commented Nov 24, 2021

This solved (temporarily) my problem with this issue, as published here:

library(httr)
httr::set_config(config(ssl_verifypeer = FALSE))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants