Error `CURL_OPENSSL_4' not found when using Julia and R

I am using Julia 1.9.2 in a package I am developing. The package makes some calls to the R language forecast package, and pulls the outputs back to julia. I am getting this error, but I am not clear on how to read this message or determine where the problem is.

Note that LD_LIBRARY_PATH is empty, so that is not causing the problem.

Here is the message.

ERROR: REvalError: Error: package or namespace load failed for ‘forecast’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/krishnab/R/x86_64-pc-linux-gnu-library/4.3/curl/libs/':
  /home/krishnab/.julia/juliaup/julia-1.9.2+0.x64.linux.gnu/bin/../lib/julia/ version `CURL_OPENSSL_4' not found (required by /home/krishnab/R/x86_64-pc-linux-gnu-library/4.3/curl/libs/

So it seems like the error is that Julia is not finding and that is the problem. So I checked the directory /home/krishnab/.julia/juliaup/julia-1.9.2+0.x64.linux.gnu/bin/../lib/julia/ and it seems like there are 3 files there,,, and So does that mean I should create a symbolic link between and or something like that?

If I am misreading this message, please let me know. Seems like Julia is trying to pass the curl library to the R environment so that the forecast package can use it, but if I am mistaken then let me know.

Also note that when I run curl --version on my computer, I get the folliowing info back, which indicates OpenSSL/3.0.2. Seems like this should reference 4.0 instead of 3.0. Here is the output of that command.

curl --version
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.14
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

Any help is appreciated.


I can replicate this problem with some simple code.

  1. Create a new environment and install the RCall package.
  2. Install the forecast package in R
  3. run the following code.
using RCall
@rlibrary forecast

and the corresponding error message is:

ERROR: REvalError: Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/krishnab/R/x86_64-pc-linux-gnu-library/4.3/curl/libs/':
  /home/krishnab/.julia/juliaup/julia-1.9.2+0.x64.linux.gnu/bin/../lib/julia/ version `CURL_OPENSSL_4' not found (required by /home/krishnab/R/x86_64-pc-linux-gnu-library/4.3/curl/libs/

Okay, I figured out the cause of this error. Once again, the error message had nothing to do with the actual error. But such is life :).

The problem here is that in the R environment, I needed to install the Curl package. So all of the curl and libcurl dependencies on my computer were fine, there were no issues with Openssl versions as referenced in the error message, CURL_OPENSSL_4 not found.

So if you see this message pop up, then check the R environment and see if you are missing the Curl package.