Anaconda IJulia installing issue (MbedTLS)

I can’t install IJulia on my notebook (High Sierra Version 10.13.6; Julia version 1.2) - Error building ‘MbedTLS’

julia> using Pkg

julia> Pkg.build("IJulia")
  Building Conda ──→ `~/.julia/packages/Conda/kLXeC/deps/build.log`
  Building ZMQ ────→ `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
  Building MbedTLS → `~/.julia/packages/MbedTLS/a1JFn/deps/build.log`
┌ Error: Error building `MbedTLS`: 
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ [ Info: Downloading https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.17.0/MbedTLS.v2.16.0.x86_64-apple-darwin14.tar.gz to /Users/dimitri.arutinovi/.julia/packages/MbedTLS/a1JFn/deps/usr/downloads/MbedTLS.v2.16.0.x86_64-apple-darwin14.tar.gz...
│ ERROR: LoadError: Could not download https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.17.0/MbedTLS.v2.16.0.x86_64-apple-darwin14.tar.gz to /Users/dimitri.arutinovi/.julia/packages/MbedTLS/a1JFn/deps/usr/downloads/MbedTLS.v2.16.0.x86_64-apple-darwin14.tar.gz:
│ ErrorException("")
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] #download#89(::Bool, ::typeof(BinaryProvider.download), ::String, ::String) at /Users/dimitri.arutinovi/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:498
│  [3] #download at ./none:0 [inlined]
│  [4] #download_verify#90(::Bool, ::Bool, ::Bool, ::typeof(download_verify), ::String, ::String, ::String) at /Users/dimitri.arutinovi/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:567
│  [5] #download_verify at ./tuple.jl:0 [inlined]
│  [6] #install#129(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::typeof(install), ::String, ::String) at /Users/dimitri.arutinovi/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:314
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at ./tuple.jl:0
│  [8] top-level scope at /Users/dimitri.arutinovi/.julia/packages/MbedTLS/a1JFn/deps/build.jl:48
│  [9] include at ./boot.jl:328 [inlined]
│  [10] include_relative(::Module, ::String) at ./loading.jl:1094
│  [11] include(::Module, ::String) at ./Base.jl:31
│  [12] include(::String) at ./client.jl:431
│  [13] top-level scope at none:5
│ in expression starting at /Users/dimitri.arutinovi/.julia/packages/MbedTLS/a1JFn/deps/build.jl:44
│ caused by [exception 1]
│ 
│ Stacktrace:
│  [1] error() at ./error.jl:42
│  [2] #download#89(::Bool, ::typeof(BinaryProvider.download), ::String, ::String) at /Users/dimitri.arutinovi/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:492
│  [3] #download at ./none:0 [inlined]
│  [4] #download_verify#90(::Bool, ::Bool, ::Bool, ::typeof(download_verify), ::String, ::String, ::String) at /Users/dimitri.arutinovi/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:567
│  [5] #download_verify at ./tuple.jl:0 [inlined]
│  [6] #install#129(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::typeof(install), ::String, ::String) at /Users/dimitri.arutinovi/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:314
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at ./tuple.jl:0
│  [8] top-level scope at /Users/dimitri.arutinovi/.julia/packages/MbedTLS/a1JFn/deps/build.jl:48
│  [9] include at ./boot.jl:328 [inlined]
│  [10] include_relative(::Module, ::String) at ./loading.jl:1094
│  [11] include(::Module, ::String) at ./Base.jl:31
│  [12] include(::String) at ./client.jl:431
│  [13] top-level scope at none:5
│ [14:43:52] #=#=#                                                              [14:43:52] ##O#- #                                                              [14:43:52] 
│ [14:43:52] curl: (60) SSL certificate problem: self signed certificate in certificate chain
│ [14:43:52] More details here: https://curl.haxx.se/docs/sslcerts.html
│ [14:43:52] 
│ [14:43:52] curl failed to verify the legitimacy of the server and therefore could not
│ [14:43:52] establish a secure connection to it. To learn more about this situation and
│ [14:43:52] how to fix it, please visit the web page mentioned above.
└ @ Pkg.Operations /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.2/Pkg/src/backwards_compatible_isolation.jl:647
  Building IJulia ─→ `~/.julia/packages/IJulia/fRegO/deps/build.log`
false

I also want to know how to solve this problem - > curl: (60) SSL certificate problem:

A common issue seems to be that Julia uses curl to download stuff, so if you have a broken curl in your PATH it will break package installation.

In particular, I’ve noticed that on MacOS people who install Anaconda often have a broken curl when their Anaconda installation gets old, especially if the update to a newer OS version. BinaryProvider was recently patched to use /usr/bin/curl on MacOS for this reason, but I don’t think that fix is in a tagged release yet:

https://github.com/JuliaPackaging/BinaryProvider.jl/pull/179

In the meantime, you can type which curl to see what curl is in your PATH, and if it isn’t /usr/bin/curl you might want to change your PATH.

1 Like

I am on Mac OSX. I changed the path from a conda directory so that which curl now gives /usr/bin/curl as suggested, but it did not resolve this issue: MbedTLS will not install with add, and it cannot be found when I try to build.

I would be grateful for any other ideas, as I can’t use Julia 1.4 properly until I fix this.

Thanks in advance

What is your exact error message? What is Sys.which("curl") in Julia?

Thanks. You helped me find it. Works now.