ERROR: Unable to automatically install 'libsodium' from '/Users/lshi/.julia/packages/libsodium_jll/gfVNr/Artifacts.toml'

Hello all,

I just installed Julia, and was trying to install packages. However I run into the following error:

import Pkg; Pkg.add("StatsBase")

Resolving package versions...
Unable to automatically install 'libsodium' from '/Users/lshi/.julia/packages/libsodium_jll/gfVNr/Artifacts.toml'

Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] #ensure_artifact_installed#42(::Platform, ::Bool, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Artifacts.jl:873
 [3] (::Pkg.Artifacts.var"#kw##ensure_artifact_installed")(::NamedTuple{(:platform, :verbose),Tuple{MacOS,Bool}}, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at ./none:0
 [4] #ensure_all_artifacts_installed#43(::Platform, ::Nothing, ::Bool, ::Bool, ::typeof(Pkg.Artifacts.ensure_all_artifacts_installed), ::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Artifacts.jl:919
 [5] #ensure_all_artifacts_installed at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:0 [inlined]
 [6] #download_artifacts#78(::MacOS, ::Bool, ::typeof(Pkg.Operations.download_artifacts), ::Array{String,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:580
 [7] #download_artifacts at ./none:0 [inlined]
 [8] #download_artifacts#73(::MacOS, ::Bool, ::typeof(Pkg.Operations.download_artifacts), ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:570
 [9] (::Pkg.Operations.var"#kw##download_artifacts")(::NamedTuple{(:platform,),Tuple{MacOS}}, ::typeof(Pkg.Operations.download_artifacts), ::Array{Pkg.Types.PackageSpec,1}) at ./none:0
 [10] #add#112(::Bool, ::MacOS, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:1017
 [11] #add at ./none:0 [inlined]
 [12] #add#25(::Bool, ::MacOS, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:102
 [13] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:72
 [14] #add#24 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:69 [inlined]
 [15] add at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:69 [inlined]
 [16] #add#21 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:67 [inlined]
 [17] add at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:67 [inlined]
 [18] #add#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:66
 [19] add(::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:66
 [20] top-level scope at In[27]:1

I have tried the following code to see if the errors can be more specific from other posts:

using Pkg

Pkg.PlatformEngines.probe_platform_engines!()

Pkg.PlatformEngines.download("https://github.com/JuliaBinaryWrappers/MKL_jll.jl/releases/download/MKL-v2020.0.166%2B0/MKL.v2020.0.166.x86_64-apple-darwin14.tar.gz", "MKL_jll.tar.gz"; verbose=true)

And I got the following error:

Could not download https://github.com/JuliaBinaryWrappers/MKL_jll.jl/releases/download/MKL-v2020.0.166%2B0/MKL.v2020.0.166.x86_64-apple-darwin14.tar.gz to MKL_jll.tar.gz: ProcessFailedException(Base.Process[Process(curl -C - ‘-#’ -f -o MKL_jll.tar.gz -L [https://github.com/JuliaBinaryWrappers/MKL_jll.jl/releases/download/MKL-v2020.0.166%2B0/MKL.v2020.0.166.x86_64-apple-darwin14.tar.gz,](https://github.com/JuliaBinaryWrappers/MKL_jll.jl/releases/download/MKL-v2020.0.166%2B0/MKL.v2020.0.166.x86_64-apple-darwin14.tar.gz%60,) ProcessSignaled(9))]) Stacktrace: [1] error(::String) at ./error.jl:33 [2] #download#82(::Bool, ::typeof(Pkg.PlatformEngines.download), ::String, ::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/PlatformEngines.jl:591 [3] (::Pkg.PlatformEngines.var"#kw##download")(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(Pkg.PlatformEngines.download), ::String, ::String) at ./none:0 [4] top-level scope at In[28]:4774:

I have also tried another code:

mktempdir() do dir
           url = "https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz"
           Pkg.PlatformEngines.download(url, joinpath(dir, "test.tar.gz"); verbose=true)
       end

And it gives me errors:

┌ Info: Downloading https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz to /var/folders/tm/m13791mx0r97c705v71g683w0000gn/T/jl_J0oj5V/test.tar.gz... └ @ Pkg.PlatformEngines /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/PlatformEngines.jl:583

Could not download https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz to /var/folders/tm/m13791mx0r97c705v71g683w0000gn/T/jl_J0oj5V/test.tar.gz: ProcessFailedException(Base.Process[Process(`curl -C - '-#' -f -o /var/folders/tm/m13791mx0r97c705v71g683w0000gn/T/jl_J0oj5V/test.tar.gz -L [https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz`,](https://github.com/JuliaBinaryWrappers/Expat_jll.jl/releases/download/Expat-v2.2.7+0/Expat.v2.2.7.x86_64-w64-mingw32.tar.gz%60,) ProcessSignaled(9))]) Stacktrace: [1] error(::String) at ./error.jl:33 [2] #download#82(::Bool, ::typeof(Pkg.PlatformEngines.download), ::String, ::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Pkg/src/PlatformEngines.jl:591 [3] #download at ./none:0 [inlined] [4] #3 at ./In[31]:3 [inlined] [5] #mktempdir#18(::String, ::typeof(mktempdir), ::var"#3#4", ::String) at ./file.jl:634 [6] mktempdir(::Function, ::String) at ./file.jl:632 (repeats 2 times) [7] top-level scope at In[31]:1

I’m using my own personal laptop, so there shouldn’t be any admin issues.

It would be great if someone can help me, thank you so much!

Hi @yecyn, welcome! Are you behind a proxy/firewall by any chance? Can you run the failed command in a terminal, outside of Julia? If not, probably there are some issues with your system.

In any case, I’d warmly recommend to upgrade to the latest stable version of Julia, currently v1.6.0, that has lots of improvements, including to the download stack.

Hi @giordano, thanks for getting back to me. I just turned off the firewall on my mac, and tried running the commend again, and it’s still having the same issue.

And I also tried running the commend in the terminal, but I got an error that there’s no commend julia:

lshi$ Julia

-bash: Julia: command not found

But I did install both 1.3 and 1.6.

Thanks.

The executable is usually called julia, lowercase

 Luoyexins-MacBook-Pro:~ lshi$ julia
-bash: julia: command not found

I still have the same error.

Hi @giordano , I ran the code with lower case, but I still have the same error… Thanks for helping!

Hi @giordano, I added Julia into Jupyter again, and it fixed the problem. Thanks!

1 Like

Thanks for letting us know you solved the issues! Sorry, I’m not very familiar with macOS, I couldn’t give you very specific directions, besides having Julia in the PATH environment variable