# Tree Hash Mismatch while installing JLD on Julia 1.6.1

**URL:** <https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804>\
**Category:** New to Julia\
**Created:** [May 25, 2021, 6:07pm UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804 "2021-05-25T18:07:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkolar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkolar/32/6488_2.png) [@mkolar](https://discourse.julialang.org/u/mkolar)\
**Post date:** [May 25, 2021, 6:07pm UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804/1 "2021-05-25T18:07:49Z")

</div>

I’ve just downloaded Julia Version 1.6.1 (2021-04-23) on a cluster and run into a Tree Hash Mismatch when installing JLD package.

```julia
(@v1.6) pkg> add JLD
    Updating registry at `~/.julia/registries/General`
   Resolving package versions...
 Downloading artifact: Lz4
┌ Error: Tree Hash Mismatch!
│ Expected git-tree-sha1: ad2663460a9a7c142287f3ccbe13e95952537c6d
│ Calculated git-tree-sha1: 77e9c15a7afb54ebf1738b5b769a8dd1a8a8683d
  Downloaded artifact: Lz4
 Downloading artifact: Lz4
┌ Error: Tree Hash Mismatch!
│ Expected git-tree-sha1: ad2663460a9a7c142287f3ccbe13e95952537c6d
│ Calculated git-tree-sha1: 77e9c15a7afb54ebf1738b5b769a8dd1a8a8683d
  Downloaded artifact: Lz4
ERROR: Unable to automatically install 'Lz4' from '/home/mkolar/.julia/packages/Lz4_jll/Dno0g/Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Artifacts.jl:443
  [3] ensure_all_artifacts_installed(artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Artifacts.jl:508
  [4] download_artifacts(ctx::Pkg.Types.Context, pkg_roots::Vector{String}; platform::Base.BinaryPlatforms.Platform, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:706
  [5] download_artifacts(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:683
  [6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1237
  [7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:203
  [8] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:79
  [9] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:77
 [10] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:408
 [11] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:386
 [12] do_cmd
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
 [13] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:550
 [14] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [15] invokelatest
    @ ./essentials.jl:706 [inlined]
 [16] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2441
 [17] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126
 [18] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:411

```

I’ve looked at the discussion here:

> [@Problems with environment - Tree Hash Mismatch!](https://discourse.julialang.org/t/problems-with-environment-tree-hash-mismatch/60103/11):
>
> I’d start from doing what the message suggests slightly_smiling_face

but starting Julia with

```julia
LD_LIBRARY_PATH="" julia

```

did not help.

The file system is `nfs`.

I would appreciate any suggestions on how to resolve this.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [May 25, 2021, 6:17pm UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804/2 "2021-05-25T18:17:37Z")

</div>

See

> [@Artifact hash mismatch when installing libpng (Julia 1.6.1)](https://discourse.julialang.org/t/artifact-hash-mismatch-when-installing-libpng-julia-1-6-1/61766/23):
>
> If @HerAdri was previously successfully using the pkg server to acquire all artifacts and that isn’t working now for some reason, there are a few reasons this could happen: The default Pkg behavior changed The user changed JULIA\_PKG\_SERVER setting This is a new artifact that the pkg servers don’t have yet The first thing shouldn’t have happened in a point release. The second presumably didn’t happen or @HerAdri would have mentioned it. That leaves the third thing, which is likely because ther…

I think it is related.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 25, 2021, 6:20pm UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804/3 "2021-05-25T18:20:30Z")

</div>

I don’t think so, this is a mismatch of the git tree sha1, but the tarball hash was apparently ok, otherwise it’d have failed before

---

<div class="post-metadata">

**Author:** ![mkolar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkolar/32/6488_2.png) [@mkolar](https://discourse.julialang.org/u/mkolar)\
**Post date:** [May 25, 2021, 11:33pm UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804/4 "2021-05-25T23:33:18Z")

</div>

Thank you for your replies.

Is there anything on my side that I can do to resolve the issue?

I do not have this problem on my local machine and not quite sure how to proceed.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 26, 2021, 12:16am UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804/5 "2021-05-26T00:16:15Z")

</div>

Quite frankly I have no idea what to do. I thought that in Julia v1.6 the git tree sha check was non fatal. It doesn’t seem to be the case though. I’d suggest you to open an issue in Pkg (yet another about this problem, but maybe at some point someone will take the time to fix it)

---

<div class="post-metadata">

**Author:** ![mkolar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkolar/32/6488_2.png) [@mkolar](https://discourse.julialang.org/u/mkolar)\
**Post date:** [May 26, 2021, 7:13pm UTC](https://discourse.julialang.org/t/tree-hash-mismatch-while-installing-jld-on-julia-1-6-1/61804/6 "2021-05-26T19:13:02Z")

</div>

The following workaround suggested by a data scientist managing the cluster worked for me.

First set

```julia
export JULIA_DEPOT_PATH="/tmp/.julia"

```

and install the desired packages. Then move the installation directory to my home folder and reset the environment variable. This apparently works as the `/tmp` folder is not on an NFS partition.
