Error: curl_easy_setopt: 48 with Plots.jl

Hey ! I wanted to use plots for one of my project, but I get this error :

┌ Error: curl_easy_setopt: 48
│ 
│ You may be using an old system libcurl library that doesn't understand options that Julia uses. You can try the following Julia code to see which libcurl library you are using:
│ 
│     using Libdl
│     filter!(contains("curl"), dllist())
│ 
│ If this indicates that Julia is not using the libcurl library that is shipped with Julia, then that is likely to be the problem. This either means:
│ 
│   1. You are using an unofficial Julia build which is configured to use a system libcurl library that is not recent enough; you may be able to fix this by upgrading the system libcurl. You should complain to your distro maintainers for allowing Julia to use a too-old libcurl version and consider using official Julia binaries instead.
│ 
│   2. You are overriding the library load path by setting `LD_LIBRARY_PATH`, in which case you are in advanced usage territory. You can try upgrading the system libcurl, unsetting `LD_LIBRARY_PATH`, or otherwise arranging for Julia to load a recent libcurl library.
│ 
│ If neither of these is the case and Julia is picking up a too old libcurl, please file an issue with the `Downloads.jl` package.
│ 

BTW, I have the last version of julia

How did you install it?

(The way it to use juliaup)

Could you show us the output of versioninfo() and tell us more about the computing environment you are running in?

I install it just like it’s said on the doc :

‘’’
import Pkg;
Pkg.add(“Plots”)
‘’’

And I run on Fedora with the veision of julia 1.9.2

who did you install this Julia? You shouldn’t install it via your Linux distribution’s package manager

I did, but why souldn’t I ?

because Linux distribution packagers often don’t care if Julia runs, they just care if it compiles, and it leads to all sorts of problems like what you’re seeing here

if you really want install something using dnf it should be varlad/juliaup Copr

1 Like

Here’s what your Linux distribution did:

  1. Saw julia needs libcurl
  2. Used their stock libcurl
  3. Packaged it

What they did not do:

  1. Check what libcurl options Julia needs
  2. Test the package thoroughly

If you would like the package to be better, then you should talk to your Linux distribution package maintainer. We cannot change the package directly, but we would be happy to talk to them.

If you want a well tested and expertly assembled package, download the official binaries.

2 Likes

@Alex_Beck there is a ticket currently open on Fedora’s bugzilla.

From what I could gather, libcurl on fedora can be provided by 2 packages: libcurl and libcurl-minimal, you probably have the latter installed. You can install the “full” version with (assuming a 64-bit system).

dnf install --allowerasing libcurl.x86_64 

Do not forget the x86_64 suffix, otherwise it might install the .686 package instead (it did for me), which won’t help you.

1 Like

That’s helpful. But also: don’t use random distro Julia builds. They are not tested and can have many issues, some of which are less obvious.

3 Likes

Maybe not a helpful comment, but @StefanKarpinski advice goes for HPC type software too. In the past I have seen questions about MPI which are really originating from using the distribution supplied MPI libraries, which are usually well out of date.

1 Like