Unsatisfiable requirements detected for package

I am getting the above error when trying to install the basic DataStructures package. I tries ] gc but that did not work.

julia> VERSION
v"1.2.0"
julia> Pkg.add("DataStructures")
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package DataStructures [864edb3b]:
 DataStructures [864edb3b] log:
 ├─possible versions are: [0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0, 0.14.0-0.14.1, 0.15.0, 0.16.1, 0.17.0-0.17.20, 0.18.0-0.18.9] or uninstalled
 ├─restricted to versions 0.17.2 by an explicit requirement, leaving only versions 0.17.2
 └─restricted by compatibility requirements with Gadfly [c91e804a] to versions: [0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0, 0.14.0-0.14.1, 0.15.0] — no versions left
   └─Gadfly [c91e804a] log:
     ├─possible versions are: [0.8.0, 1.0.0-1.0.1, 1.1.0, 1.2.0-1.2.1, 1.3.0-1.3.1] or uninstalled
     └─restricted to versions 1.0.1 by an explicit requirement, leaving only versions 1.0.1
Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::typeof(Pkg.GraphType.propagate_constraints!), ::Pkg.GraphType.Graph, ::Set{Int64}) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/GraphType.jl:1007
 [2] propagate_constraints! at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/GraphType.jl:948 [inlined]
 [3] #simplify_graph!#121(::Bool, ::typeof(Pkg.GraphType.simplify_graph!), ::Pkg.GraphType.Graph, ::Set{Int64}) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/GraphType.jl:1462
 [4] simplify_graph! at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/GraphType.jl:1462 [inlined]
 [5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/Operations.jl:317
 [6] #add#100(::Bool, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/Operations.jl:962
 [7] #add at ./none:0 [inlined]
 [8] #add#25(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:99
 [9] add at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:69 [inlined]
 [10] #add#24 at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:67 [inlined]
 [11] add at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:67 [inlined]
 [12] #add#21 at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:65 [inlined]
 [13] add at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:65 [inlined]
 [14] #add#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::String) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:64
 [15] add(::String) at /sware/build/Building/julia/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:64
 [16] top-level scope at REPL[7]:1

Looks like an explicit conflict with the version of Gadfly you have installed. You can try to update Gadfly. If that doesn’t work, you may need to set up a specific environment without Gadfly.

1 Like

You could also try installing Julia v1.5. Then perhaps you can have more recent versions of some of your dependencies.