Error when trying to install DifferentialEquations.jl

Hi I am still a bit new to Julia and wanted to try out DifferentialEquations in Pluto. But when tried to install it via Pkg.add(“DifferentialEquations”) I got this error:

**Precompiling** project...

✗ LinearSolve

✗ NonlinearSolve

✗ OrdinaryDiffEq

✗ DelayDiffEq

✗ StochasticDiffEq

✗ DifferentialEquations

156 dependencies successfully precompiled in 113 seconds

6 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

1 dependency had warnings during precompilation:

┌ Random123 [74087812-796a-5b5d-8853-05524746bad3]

│ **┌ Warning:** AES-NI is not enabled, so AESNI and ARS are not available.

│ **└** @ Random123 ~/.julia/packages/Random123/u5oEp/src/Random123.jl:55

└

then when I tried to install one of them individually I got this error which doesn’t make any sense for me

**julia>** using LinearSolve

│ Package LinearSolve not found, but a package named LinearSolve is available

│ from a registry.

│ Install package?

│ (@v1.9) pkg> add LinearSolve

└ (y/n/o) [y]: y

**Resolving** package versions...

**Updating** `~/.julia/environments/v1.9/Project.toml`

[7ed4a6bd] + LinearSolve v2.2.1

**No Changes** to `~/.julia/environments/v1.9/Manifest.toml`

**[ Info:** Precompiling LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae]

**ERROR:** LoadError: MethodError: convert(::Type{Union{}}, ::SparseArrays.SparseMatrixCSC{Float64, Int64}) is ambiguous.

Candidates:

convert(::**Type**{T}, arg) where T<:VecElement

@ Base baseext.jl:19

convert(T::**Type**{<:Core.IntrinsicFunction}, x)

@ Base essentials.jl:289

convert(T::**Type**{<:LinearAlgebra.LowerTriangular}, m::**SparseArrays.AbstractSparseMatrixCSC**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsematrix.jl:930

convert(::**Type**{T}, a::**AbstractArray**) where T<:BitArray

@ Base bitarray.jl:580

convert(T::**Type**{<:Nothing}, x)

@ Base essentials.jl:290

convert(::**Type**{T}, M::**AbstractArray**) where T<:OffsetArrays.OffsetArray

@ OffsetArrays ~/.julia/packages/OffsetArrays/TcCEq/src/OffsetArrays.jl:256

convert(::**Type**{T}, m::**AbstractMatrix**) where T<:LinearAlgebra.Bidiagonal

@ LinearAlgebra /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/LinearAlgebra/src/bidiag.jl:206

convert(::**Type**{T}, a::**AbstractArray**) where T<:Array

@ Base array.jl:613

convert(T::**Type**{<:SparseArrays.AbstractSparseMatrixCSC}, m::**AbstractMatrix**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsematrix.jl:922

convert(T::**Type**{<:SparseArrays.SparseVector}, m::**SparseArrays.AbstractSparseMatrixCSC**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsevector.jl:531

convert(T::**Type**{<:LinearAlgebra.Diagonal}, m::**SparseArrays.AbstractSparseMatrixCSC**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsematrix.jl:924

convert(T::**Type**{<:LinearAlgebra.UpperTriangular}, m::**SparseArrays.AbstractSparseMatrixCSC**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsematrix.jl:932

convert(::**Type**{T}, obj) where T<:FunctionWrappers.FunctionWrapper

@ FunctionWrappers ~/.julia/packages/FunctionWrappers/Q5cBx/src/FunctionWrappers.jl:113

convert(T::**Type**{<:LinearAlgebra.Tridiagonal}, m::**SparseArrays.AbstractSparseMatrixCSC**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsematrix.jl:928

convert(T::**Type**{<:LinearAlgebra.SymTridiagonal}, m::**SparseArrays.AbstractSparseMatrixCSC**)

@ SparseArrays /opt/homebrew/Cellar/julia/1.9.1/share/julia/stdlib/v1.9/SparseArrays/src/sparsematrix.jl:926

Possible fix, define

convert(::Type{Union{}}, ::SparseArrays.AbstractSparseMatrixCSC)

Stacktrace:

[1] **Sparspak.SpkSparseSolver.SparseSolver{Int64, Float64}(**p::SparseArrays.SparseMatrixCSC{Float64, Int64}, slvr::Sparspak.SpkSparseBase._SparseBase{Int64, Float64}, n::Int64, ma::Int64, na::Int64, mc::Int64, nc::Int64, _inmatrixdone::Bool, _orderdone::Bool, _symbolicdone::Bool, _factordone::Bool, _trisolvedone::Bool, _refinedone::Bool, _condestdone::Bool**)**

@ Sparspak.SpkSparseSolver ~/.julia/packages/Sparspak/oqBYl/src/SparseMethod/SpkSparseSolver.jl:18

[2] **Sparspak.SpkSparseSolver.SparseSolver(**p::SparseArrays.SparseMatrixCSC{Float64, Int64}, slvr::Sparspak.SpkSparseBase._SparseBase{Int64, Float64}, n::Int64, ma::Int64, na::Int64, mc::Int64, nc::Int64, _inmatrixdone::Bool, _orderdone::Bool, _symbolicdone::Bool, _factordone::Bool, _trisolvedone::Bool, _refinedone::Bool, _condestdone::Bool**)**

@ Sparspak.SpkSparseSolver ~/.julia/packages/Sparspak/oqBYl/src/SparseMethod/SpkSparseSolver.jl:18

[3] **Sparspak.SpkSparseSolver.SparseSolver(**m::SparseArrays.SparseMatrixCSC{Float64, Int64}**)**

@ Sparspak.SparseCSCInterface ~/.julia/packages/Sparspak/oqBYl/src/SparseCSCInterface/SparseCSCInterface.jl:189

[4] **sparspaklu(**m::SparseArrays.SparseMatrixCSC{Float64, Int64}; factorize::Bool**)**

@ Sparspak.SparseCSCInterface ~/.julia/packages/Sparspak/oqBYl/src/SparseCSCInterface/SparseCSCInterface.jl:219

[5] top-level scope

@ ~/.julia/packages/LinearSolve/GoL1I/src/factorization.jl:1314

[6] **include(**mod::Module, _path::String**)**

@ Base ./Base.jl:457

[7] **include(**x::String**)**

@ LinearSolve ~/.julia/packages/LinearSolve/GoL1I/src/LinearSolve.jl:1

[8] top-level scope

@ ~/.julia/packages/LinearSolve/GoL1I/src/LinearSolve.jl:83

[9] **include**

@ ./Base.jl:457 [inlined]

[10] **include_package_for_output(**pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing**)**

@ Base ./loading.jl:2045

[11] top-level scope

@ stdin:3

in expression starting at /Users/julianjagerndorfer/.julia/packages/LinearSolve/GoL1I/src/factorization.jl:1314

in expression starting at /Users/julianjagerndorfer/.julia/packages/LinearSolve/GoL1I/src/LinearSolve.jl:1

in expression starting at stdin:3

**ERROR:** Failed to precompile LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae] to "/Users/julianjagerndorfer/.julia/compiled/v1.9/LinearSolve/jl_kxqam6".

Stacktrace:

[1] **error(**s::String**)**

@ Base ./error.jl:35

[2] **compilecache(**pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool**)**

@ Base ./loading.jl:2296

[3] **compilecache**

@ ./loading.jl:2163 [inlined]

[4] **_require(**pkg::Base.PkgId, env::String**)**

@ Base ./loading.jl:1805

[5] **_require_prelocked(**uuidkey::Base.PkgId, env::String**)**

@ Base ./loading.jl:1660

[6] **macro expansion**

@ ./loading.jl:1648 [inlined]

[7] **macro expansion**

@ ./lock.jl:267 [inlined]

[8] **require(**into::Module, mod::Symbol**)**

@ Base ./loading.jl:1611

When googling the error, I found this problem which seems to be very similar to mine expect of the fact that I am on MacOS not Manjaro https://discourse.julialang.org/t/solved-precompilation-of-ordinarydiffeq-fails-in-julia-1-8-5-on-manjaro-arch-linux/93979

I hope you can help me this my versioninfo()

Julia Version 1.9.1
Commit 147bdf428c (2023-06-07 08:27 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores
Environment:
  JULIA_IMAGE_THREADS = 1

Thank you!
Julian

Is this the homebrew build? Homebrew’s Julia build is not standard and has some issues in type inference. I recommend not using it.