An unknown option was passed in to libcurl #330

Hello guys, I am getting this error when trying to send emails through blastula.

smtp_send(prepare_test_message(), 
                     to = "test@gmail.com", 
                     from = "test2@gmail.com", 
                     credentials = creds_file("gmail_creds"))
Error in handle_setopt(h, ...) : 
**An unknown option was passed in to libcurl**

When I run on terminal

[andresimi@andresimi bin]$ which curl
/usr/local/bin/curl
[andresimi@andresimi bin]$ which libcurl
/usr/bin/which: no libcurl in (/opt/conda/bin:/opt/conda/bin:/home/andresimi/.local/bin:/home/andresimi/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/var/lib/snapd/snap/bin)

I am pretty sure curl, and libcurl-devel were installed via dnf.

Do you have any idea?
Thanks

Versions
R 4.3.3
Fedora 39
Blastula 0.35
curl 8.2.1
libcurl 8.2.1

Seems like you are using conda. Did you install R and blastula with conda? If not, then I suggest that you deactivate conda when using non-conda R.

Alternatively, install R and all packages with conda.

Hi, thank you for answer. Maybe in the past but actually I don't have conda installed. And I am having the same problem with a recent fresh install of fedora in another computer, which never had contact with conda.

In the other computer I am having this output:

/usr/bin/which: no libcurl in (/home/andresimi/.local/bin:/home/andresimi/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)

You cannot use which to find libraries. It only works for executables. Libraries are not executables.

Make sure you have all the required system packages installed. These are the ones needed on Fedora 39:

❯ pak::pkg_sysreqs("blastula", sysreqs_platform = "fedora-39")
── Install scripts ─────────────────────────────── Fedora 39 ──
dnf install -y pandoc libcurl-devel openssl-devel make \
  libicu-devel

── Packages and their system dependencies ─────────────────────
blastula  – pandoc
curl      – libcurl-devel, openssl-devel
fs        – make
knitr     – pandoc
openssl   – openssl-devel
rmarkdown – pandoc
sass      – make
stringi   – libicu-devel

Hi, I checked that and I have all these packages installed. Still getting the same error.
I also updated everything I could. So now I am on

Versions
R 4.4.1
Fedora 40
Blastula 0.35
curl 8.6.0
libcurl 8.6.0

Best!

What's the output of this code?

system2("ldd", file.path(find.package("curl"), "libs", "curl.so"))

Here it is.
Thank you.

> system2("ldd", file.path(find.package("curl"), "libs", "curl.so"))
	linux-vdso.so.1 (0x00007fa2f43eb000)
	libcurl.so.4 => /lib64/libcurl.so.4 (0x00007fa2f4326000)
	libR.so => /usr/lib64/R/lib/libR.so (0x00007fa2f3e00000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa2f3c0f000)
	libnghttp2.so.14 => /lib64/libnghttp2.so.14 (0x00007fa2f42fc000)
	libidn2.so.0 => /lib64/libidn2.so.0 (0x00007fa2f42da000)
	libssl.so.3 => /lib64/libssl.so.3 (0x00007fa2f3b3a000)
	libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007fa2f3600000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fa2f4283000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fa2f4262000)
	libflexiblas.so.3 => /lib64/libflexiblas.so.3 (0x00007fa2f3200000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa2f311c000)
	libreadline.so.8 => /lib64/libreadline.so.8 (0x00007fa2f3ae1000)
	libtre.so.5 => /lib64/libtre.so.5 (0x00007fa2f424d000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fa2f307c000)
	libdeflate.so.0 => /lib64/libdeflate.so.0 (0x00007fa2f4237000)
	liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fa2f3aae000)
	libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fa2f35ec000)
	libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007fa2f35bc000)
	libicuuc.so.74 => /lib64/libicuuc.so.74 (0x00007fa2f2e88000)
	libicui18n.so.74 => /lib64/libicui18n.so.74 (0x00007fa2f2a00000)
	libgomp.so.1 => /lib64/libgomp.so.1 (0x00007fa2f2e32000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa2f358e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa2f43ed000)
	libunistring.so.5 => /lib64/libunistring.so.5 (0x00007fa2f2853000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fa2f2d6a000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fa2f2d53000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fa2f2d4c000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fa2f2d3c000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fa2f2d35000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa2f2841000)
	libgfortran.so.5 => /lib64/libgfortran.so.5 (0x00007fa2f2400000)
	libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007fa2f27f9000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007fa2f27cc000)
	libicudata.so.74 => /lib64/libicudata.so.74 (0x00007fa2f0600000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa2f0200000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa2f279f000)

Maybe this is a change in libcurl, and that option does not work in newer libcurl. Try debugging blastula / curl to find out which option the error is about, and then check that it still exists in your libcurl version.

You might also open a blastula issue about this.

I am not sure if I understood you or I don't know how to debug. The command is pretty simple and reproducible, with minimal options. But still doesn't work.

smtp_send(prepare_test_message(), 
                     to = "test@gmail.com", 
                     from = "test2@gmail.com", 
                     credentials = creds_file("gmail_creds"))
Error in handle_setopt(h, ...) : 
**An unknown option was passed in to libcurl**

Yeah, I opened an issue there before a submit here (An unknown option was passed in to libcurl · Issue #330 · rstudio/blastula · GitHub). Zero answers...