# Error \`CURL\_OPENSSL\_4' not found when using Julia and R

**URL:** <https://discourse.julialang.org/t/error-curl-openssl-4-not-found-when-using-julia-and-r/101847>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 20, 2023, 6:37pm UTC](https://discourse.julialang.org/t/error-curl-openssl-4-not-found-when-using-julia-and-r/101847 "2023-07-20T18:37:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![00krishna](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00krishna/32/8843_2.png) [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Post date:** [July 20, 2023, 6:37pm UTC](https://discourse.julialang.org/t/error-curl-openssl-4-not-found-when-using-julia-and-r/101847/1 "2023-07-20T18:37:36Z")

</div>

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.

```julia
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/curl.so':
  /home/krishnab/.julia/juliaup/julia-1.9.2+0.x64.linux.gnu/bin/../lib/julia/libcurl.so: version `CURL_OPENSSL_4' not found (required by /home/krishnab/R/x86_64-pc-linux-gnu-library/4.3/curl/libs/curl.so)

```

So it seems like the error is that Julia is not finding `libcurl.so` 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/libcurl.so` and it seems like there are 3 files there, `libcurl.so`, `libcurl.so.4`, and `libcurl.so.4.8.0`. So does that mean I should create a symbolic link between `libcurl.so` and `libcurl.so.4` 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.

```julia
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.

UPDATE:

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.

```julia
using RCall
@rlibrary forecast

```

and the corresponding error message is:

```julia
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/curl.so':
  /home/krishnab/.julia/juliaup/julia-1.9.2+0.x64.linux.gnu/bin/../lib/julia/libcurl.so: version `CURL_OPENSSL_4' not found (required by /home/krishnab/R/x86_64-pc-linux-gnu-library/4.3/curl/libs/curl.so)

```

---

<div class="post-metadata">

**Author:** ![00krishna](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00krishna/32/8843_2.png) [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Post date:** [July 21, 2023, 6:40pm UTC](https://discourse.julialang.org/t/error-curl-openssl-4-not-found-when-using-julia-and-r/101847/2 "2023-07-21T18:40:17Z")

</div>

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.
