Unable to automatically install 'CompilerSupportLibraries'

Hi! I’m new to Julia and I was trying to install the package “Distributions”. After running Pkg.add("Distributions"), I got the following error

Resolving package versions...
Unable to automatically install 'CompilerSupportLibraries' from '/Users/xxx/.julia/packages/CompilerSupportLibraries_jll/bjj0c/Artifacts.toml'

Can anyone help me with it? Thanks a lot!

2 Likes

I meet the same problem with Julia 1.4 by add SymPy

Let’s try to debug the issue:

]add https://github.com/giordano/DebugArtifacts.jl
using DebugArtifacts
debug_artifact("CompilerSupportLibraries")

NOTE: this will not fix anything, it’ll just make it clearer what’s the underlying problem

1 Like

I had the same issue with a fresh installation of julia 1.4.

This is the message I get

julia> debug_artifact("CompilerSupportLibraries")
[ Info: Downloading Artifacts.toml to /tmp/jl_ahxTgT/Artifacts.toml...
######################################################################## 100.0%
[ Info: Extracting artifact info for platform x86_64-linux-gnu-libgfortran4-cxx11...
[ Info: Found meta object with git-tree-sha1 0fd0fb67de786e5d7b2eb67181d35e4bcab639cf, attempting download...
######################################################################## 100.0%
[ Info: No hash cache found
[ Info: Calculated hash adcc8519411cf0518c472d3ce47d8ac93492934a05c0276afe76eda6d91c4f4d for file /tmp/jl_2xKTXm-download.gz
[ Info: Unpacking /tmp/jl_2xKTXm-download.gz into /tmp/jl_ahxTgT/unpacked...
[ Info: Double-checking git-tree-sha (this is skipped on Windows)

Looks like it worked :thinking:

Interesting…
I just got another hash mismatch

┌ Error: Tree Hash Mismatch!
│   Expected git-tree-sha1:   21b8ba5bf6474cac6fa64d9ad681e6b506eba90a
│   Calculated git-tree-sha1: d77da817310b30ca13b56b13c9ee1173e153503f
ERROR: Unable to automatically install 'Arpack' from '~/.julia/packages/Arpack_jll/V7Qow/Artifacts.toml'

and again

julia> debug_artifact("Arpack")
[ Info: Probing for download engine...
[ Info: Probing curl as a possibility...
[ Info:   Probe successful for curl
[ Info: Found download engine curl
[ Info: Probing for compression engine...
[ Info: Probing tar as a possibility...
[ Info:   Probe successful for tar
[ Info: Found compression engine tar
[ Info: Downloading Artifacts.toml to /tmp/jl_Kx9yKY/Artifacts.toml...
######################################################################## 100.0%
[ Info: Extracting artifact info for platform x86_64-linux-gnu-libgfortran4-cxx11...
[ Info: Found meta object with git-tree-sha1 21b8ba5bf6474cac6fa64d9ad681e6b506eba90a, attempting download...
######################################################################## 100.0%
[ Info: No hash cache found
[ Info: Calculated hash c490ad158a9ae41bbe2041fc5bd825d962e9045c4bfff921a38da244c8e6c7e1 for file /tmp/jl_OJ2I2U-download.gz
[ Info: Unpacking /tmp/jl_OJ2I2U-download.gz into /tmp/jl_Kx9yKY/unpacked...
[ Info: Double-checking git-tree-sha (this is skipped on Windows)

What Julia version are you using?

Julia 1.4.0

I’m getting the same on Julia 1.3.1

Did you try to follow Unable to automatically install 'CompilerSupportLibraries' - #3 by giordano to debug the issue?

What operating system do you use? What filesystem? Could you please provide as much information as possible to help assess what might be the problem?

1 Like

Thanks for your reply!
I tried

using Pkg
Pkg.add("Distributions")

again today, all of a sudden, it works. I have no idea what happened. I didn’t do anything to fix it.

1.3.1

Sorry for the late reply. I am running this on a cluster and I wanted to install also Julia 1.3.1 on it to see if the same error appears there, and I do get the same error.

Here is some information:

cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.3 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME=RHEL
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.3"

This is the full error info I get:

(v1.3) pkg> add DifferentialEquations
  Updating registry at `~/.julia/registries/General`
┌ Warning: Some registries failed to update:
│     — `~/.julia/registries/General` — registry dirty
└ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1199
 Resolving package versions...
┌ Error: Tree Hash Mismatch!
│   Expected git-tree-sha1:   0fd0fb67de786e5d7b2eb67181d35e4bcab639cf
│   Calculated git-tree-sha1: b5dfbf709a492a96aa4dcaf46616293ce08b7eab
└ @ Pkg.Artifacts /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Artifacts.jl:779
ERROR: Unable to automatically install 'CompilerSupportLibraries' from '/home/labs/orenraz/roiho/.julia/packages/CompilerSupportLibraries_jll/kmL78/Artifacts.toml'
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] #ensure_artifact_installed#42(::Pkg.BinaryPlatforms.Platform, ::Bool, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Artifacts.jl:873
 [3] (::Pkg.Artifacts.var"#kw##ensure_artifact_installed")(::NamedTuple{(:platform, :verbose),Tuple{Pkg.BinaryPlatforms.Linux,Bool}}, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at ./none:0
 [4] #ensure_all_artifacts_installed#43(::Pkg.BinaryPlatforms.Platform, ::Nothing, ::Bool, ::Bool, ::typeof(Pkg.Artifacts.ensure_all_artifacts_installed), ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Artifacts.jl:919
 [5] #ensure_all_artifacts_installed at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:0 [inlined]
 [6] #download_artifacts#78(::Pkg.BinaryPlatforms.Linux, ::Bool, ::typeof(Pkg.Operations.download_artifacts), ::Array{String,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:580
 [7] #download_artifacts at ./none:0 [inlined]
 [8] #download_artifacts#73(::Pkg.BinaryPlatforms.Linux, ::Bool, ::typeof(Pkg.Operations.download_artifacts), ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:570
 [9] (::Pkg.Operations.var"#kw##download_artifacts")(::NamedTuple{(:platform,),Tuple{Pkg.BinaryPlatforms.Linux}}, ::typeof(Pkg.Operations.download_artifacts), ::Array{Pkg.Types.PackageSpec,1}) at ./none:0
 [10] #add#112(::Bool, ::Pkg.BinaryPlatforms.Linux, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:1017
 [11] #add at ./none:0 [inlined]
 [12] #add#25(::Bool, ::Pkg.BinaryPlatforms.Linux, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:102
 [13] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:72
 [14] do_add!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/REPLMode.jl:505
 [15] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Base.invokelatest), ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:709
 [16] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:708
 [17] do_cmd!(::Pkg.REPLMode.Command, ::REPL.LineEditREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/REPLMode.jl:412
 [18] #do_cmd#23(::Bool, ::typeof(Pkg.REPLMode.do_cmd), ::REPL.LineEditREPL, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/REPLMode.jl:391
 [19] do_cmd at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/REPLMode.jl:387 [inlined]
 [20] (::Pkg.REPLMode.var"#28#31"{REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/REPLMode.jl:619
 [21] #invokelatest#1 at ./essentials.jl:709 [inlined]
 [22] invokelatest at ./essentials.jl:708 [inlined]
 [23] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/REPL/src/LineEdit.jl:2306
 [24] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:1045
 [25] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:201
 [26] (::Base.var"#770#772"{Bool,Bool,Bool,Bool})(::Module) at ./client.jl:382
 [27] #invokelatest#1 at ./essentials.jl:709 [inlined]
 [28] invokelatest at ./essentials.jl:708 [inlined]
 [29] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:366
 [30] exec_options(::Base.JLOptions) at ./client.jl:304
 [31] _start() at ./client.jl:460

Maybe this issue is because of the cluster?

Any chance to use v1.4.0 instead?

Well, you were having problems also with 1.4.0 above. What file system are you using? Do you have a special umask?

I am not sure. Probably this is related to the fact that this is a cluster, and the installation is shared, but I am trying to add packages for my user.

Is there a standard solution in this case? Maybe I need to install a separate julia for my user?

I’m not sure that’s a problem by itself. The installation of the artifacts is failing to get the expected git tree sha when unpacking the content of the tarball, even though the hash of the tarball is the one expected (it would have failed before, it this wasn’t the case). The function which computes the git tree sha may be having some troubles to do its job, but I have no idea why. Particular umasks or filesystems have been responsible for some problems in the past, but in Julia 1.4 all of theme should have been fixed

1 Like

What kind of filesystem is this being installed onto?

I am not sure who to check this (not an expert). I am running this on cluster, and I do not want to play with things too much. Can you tell me how to check it?