Can't add package Plots

Here is the whole story :frowning:

(v0.7) pkg> add Plots
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package StatsBase [2913bbd2]:
 StatsBase [2913bbd2] log:
 β”œβ”€possible versions are: [0.1.0, 0.2.0-0.2.1, 0.2.3-0.2.10, 0.3.0-0.3.13, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.16, 0.7.0-0.7.4, 0.8.0-0.8.3, 0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5, 0.20.0-0.20.1, 0.22.0, 0.23.0-0.23.1, 0.24.0, 0.25.0] or uninstalled
 β”œβ”€restricted by julia compatibility requirements to versions: [0.24.0, 0.25.0] or uninstalled
 β”œβ”€restricted by compatibility requirements with Plots [91a5bcdd] to versions: [0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5, 0.20.0-0.20.1, 0.22.0, 0.23.0-0.23.1, 0.24.0, 0.25.0], leaving only versions: [0.24.0, 0.25.0]
 β”‚ └─Plots [91a5bcdd] log:
 β”‚   β”œβ”€possible versions are: [0.0.1-0.0.2, 0.1.0-0.1.3, 0.2.0, 0.3.0, 0.4.0-0.4.2, 0.5.0-0.5.4, 0.6.0-0.6.2, 0.7.0-0.7.5, 0.8.0-0.8.2, 0.9.0-0.9.4, 0.10.0-0.10.3, 0.11.1-0.11.4, 0.12.0-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.2] or uninstalled
 β”‚   β”œβ”€restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.2, 0.1.0-0.1.3, 0.2.0, 0.3.0, 0.4.0-0.4.2, 0.5.0-0.5.4, 0.6.0-0.6.2, 0.7.0-0.7.5, 0.8.0-0.8.2, 0.9.0-0.9.4, 0.10.0-0.10.3, 0.11.1-0.11.4, 0.12.0-0.12.4, 0.13.0-0.13.1, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0, 0.17.0-0.17.4, 0.18.0, 0.19.0-0.19.3, 0.20.0-0.20.2]
 β”‚   └─restricted by julia compatibility requirements to versions: [0.18.0, 0.19.0-0.19.3] or uninstalled, leaving only versions: [0.18.0, 0.19.0-0.19.3]
 └─restricted by compatibility requirements with Missings [e1d29d7a] to versions: [0.1.0, 0.2.0-0.2.1, 0.2.3-0.2.10, 0.3.0-0.3.13, 0.4.0-0.4.4, 0.5.0-0.5.3, 0.6.0-0.6.16, 0.7.0-0.7.4, 0.8.0-0.8.3, 0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0, 0.16.0-0.16.1, 0.17.0, 0.18.0, 0.19.0-0.19.5] or uninstalled β€” no versions left
   └─Missings [e1d29d7a] log:
     β”œβ”€possible versions are: [0.2.0-0.2.10, 0.3.0] or uninstalled
     └─restricted by julia compatibility requirements to versions: uninstalled

Should be fixed.

I don’t understand what was happening. A few minutes later, in the same REPL session, I tried:

(v0.7) pkg> up
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
 [no changes]

and then add Plots worked as expected:

(v0.7) pkg> add Plots
 Resolving package versions...
 Installed OrderedCollections ─ v1.0.1
 Installed DataStructures ───── v0.13.0
 Installed Missings ─────────── v0.3.1
  Updating `~/.julia/environments/v0.7/Project.toml`
  [91a5bcdd] + Plots v0.19.3
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [d38c429a] + Contour v0.5.1
  [864edb3b] + DataStructures v0.13.0
  [28b8d3ca] + GR v0.34.1
  [442fdcdd] + Measures v0.3.0
  [e1d29d7a] + Missings v0.3.1
  [77ba4419] + NaNMath v0.3.2
  [bac558e1] + OrderedCollections v1.0.1
  [ccf2f8ad] + PlotThemes v0.3.0
  [995b91a9] + PlotUtils v0.5.4
  [91a5bcdd] + Plots v0.19.3
  [3cdcf5f2] + RecipesBase v0.5.0
  [992d4aef] + Showoff v0.2.1
  [a2af1166] + SortingAlgorithms v0.3.1
  [90137ffa] + StaticArrays v0.8.3
  [2913bbd2] + StatsBase v0.25.0

Something similar happened to me. I was trying to install Flux on Julia 1.0.1 by running Pkg.add("Flux") and it failed due to an unsatisfiable dependencies from Plots:

  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...                          ]  0.0 %
Unsatisfiable requirements detected for package GR [28b8d3ca]:
 GR [28b8d3ca] log:
 β”œβ”€possible versions are: [0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0-0.9.17, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0-0.32.3, 0.33.1, 0.34.0-0.34.1, 0.35.0] or uninstalled
 β”œβ”€restricted to versions 0.34.0-* by Plots [91a5bcdd], leaving only versions [0.34.0-0.34.1, 0.35.0]
 β”‚ └─Plots [91a5bcdd] log:
 β”‚   β”œβ”€possible versions are: 0.20.6 or uninstalled
 β”‚   └─Plots [91a5bcdd] is fixed to version 0.20.6+
 β”œβ”€restricted to versions 0.34.1 by an explicit requirement, leaving only versions 0.34.1
 └─restricted by julia compatibility requirements to versions: 0.35.0 or uninstalled β€” no versions left

Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:1005
 [2] propagate_constraints! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:946 [inlined]
 [3] #simplify_graph!#121(::Bool, ::Function, ::Pkg.GraphType.Graph, ::Set{Int64}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:1460
 [4] simplify_graph! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/GraphType.jl:1460 [inlined]
 [5] macro expansion at ./logging.jl:319 [inlined]
 [6] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:338
 [7] #add_or_develop#58(::Array{Base.UUID,1}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1164
 [8] #add_or_develop at ./none:0 [inlined]
 [9] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:64
 [10] #add_or_develop at ./none:0 [inlined]
 [11] #add_or_develop#12 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:29 [inlined]
 [12] #add_or_develop at ./none:0 [inlined]
 [13] #add_or_develop#11 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:28 [inlined]
 [14] #add_or_develop at ./none:0 [inlined]
 [15] #add_or_develop#10 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:27 [inlined]
 [16] #add_or_develop at ./none:0 [inlined]
 [17] #add#18 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:69 [inlined]
 [18] add(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:69
 [19] top-level scope at none:0
 [20] include_string(::Module, ::String, ::String) at ./loading.jl:1005
 [27] include at ./boot.jl:317 [inlined]
 [28] include_relative(::Module, ::String) at ./loading.jl:1041
 [29] include(::Module, ::String) at ./sysimg.jl:29
 [30] exec_options(::Base.JLOptions) at ./client.jl:229
 [31] _start() at ./client.jl:421

Perform Pkg.update() immediately after the error:

  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaPlots/Plots.jl.git`
  Updating git-repo `https://github.com/JuliaGizmos/WebIO.jl.git`
  Updating git-repo `https://github.com/JuliaPlots/RecipesBase.jl.git`
  Updating git-repo `https://github.com/sglyon/PlotlyJS.jl.git`
 Resolving package versions...                          ]  0.0 %
 Installed DiffEqDiffTools ─ v0.7.0
 Installed NLSolversBase ─── v7.1.1
 Installed TableTraits ───── v0.4.0
 Installed Mustache ──────── v0.5.5
 Installed BinaryProvider ── v0.5.2
 Installed PlotUtils ─────── v0.5.5
 Installed Widgets ───────── v0.4.3
 Installed CMake ─────────── v1.1.0
 Installed GR ────────────── v0.35.0
 Installed ForwardDiff ───── v0.10.0
 Installed Arpack ────────── v0.3.0
 Installed Compat ────────── v1.3.0
 Installed StaticArrays ──── v0.9.0
 Installed CSV ───────────── v0.4.2
 Installed Conda ─────────── v1.1.1
 Installed Parsers ───────── v0.2.9
 Installed MbedTLS ───────── v0.6.4
 Installed IterTools ─────── v1.1.1
 Installed Interpolations ── v0.10.5
  Updating `~/.julia/environments/v1.0/Project.toml`
  [336ed68f] ↑ CSV v0.4.1 β‡’ v0.4.2
  [28b8d3ca] ↑ GR v0.34.1 β‡’ v0.35.0
  [f0f68f2c] ~ PlotlyJS v0.11.2+ #master (https://github.com/sglyon/PlotlyJS.jl.git)
  [91a5bcdd] ↑ Plots v0.20.5+ #sd-remote (https://github.com/JuliaPlots/Plots.jl.git) β‡’ v0.20.6+ #sd-remote (https://github.com/JuliaPlots/Plots.jl.git)
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [7d9fca2a] ↑ Arpack v0.2.3 β‡’ v0.3.0
  [b99e7846] ↑ BinaryProvider v0.5.1 β‡’ v0.5.2
  [631607c0] ↑ CMake v1.0.2 β‡’ v1.1.0
  [336ed68f] ↑ CSV v0.4.1 β‡’ v0.4.2
  [34da2185] ↑ Compat v1.2.0 β‡’ v1.3.0
  [8f4d0f93] ↑ Conda v1.0.2 β‡’ v1.1.1
  [01453d9d] ↑ DiffEqDiffTools v0.6.0 β‡’ v0.7.0
  [f6369f11] ↑ ForwardDiff v0.9.0 β‡’ v0.10.0
  [28b8d3ca] ↑ GR v0.34.1 β‡’ v0.35.0
  [a98d9a8b] ↑ Interpolations v0.10.3 β‡’ v0.10.5
  [c8e1da08] ↑ IterTools v1.1.0 β‡’ v1.1.1
  [739be429] ↑ MbedTLS v0.6.3 β‡’ v0.6.4
  [ffc61752] ↑ Mustache v0.5.4 β‡’ v0.5.5
  [d41bc354] ↑ NLSolversBase v7.1.0 β‡’ v7.1.1
  [69de0a69] ↑ Parsers v0.2.7 β‡’ v0.2.9
  [995b91a9] ↑ PlotUtils v0.5.4 β‡’ v0.5.5
  [f0f68f2c] ~ PlotlyJS v0.11.2+ #master (https://github.com/sglyon/PlotlyJS.jl.git)
  [91a5bcdd] ↑ Plots v0.20.5+ #sd-remote (https://github.com/JuliaPlots/Plots.jl.git) β‡’ v0.20.6+ #sd-remote (https://github.com/JuliaPlots/Plots.jl.git)
  [90137ffa] ↑ StaticArrays v0.8.3 β‡’ v0.9.0
  [3783bdb8] ↑ TableTraits v0.3.1 β‡’ v0.4.0
  [cc8bc4a8] ↑ Widgets v0.4.2 β‡’ v0.4.3
  Building GR ──────→ `~/.julia/packages/GR/k8wwU/deps/build.log`
  Building CMake ───→ `~/.julia/packages/CMake/xNoo8/deps/build.log`
  Building Arpack ──→ `~/.julia/packages/Arpack/UiiMc/deps/build.log`
  Building MbedTLS ─→ `~/.julia/packages/MbedTLS/CwGUN/deps/build.log`
  Building Conda ───→ `~/.julia/packages/Conda/uQitS/deps/build.log`
  Building Plots ───→ `~/.julia/packages/Plots/xaQU3/deps/build.log`
  Building PlotlyJS β†’ `~/.julia/packages/PlotlyJS/F68Kb/deps/build.log`

Run Pkg.add("Flux") again and the installation became successful:

 Resolving package versions...
 Installed Media ───────── v0.4.1
 Installed Adapt ───────── v0.4.0
 Installed ZipFile ─────── v0.7.0
 Installed AbstractTrees ─ v0.2.0
 Installed NNlib ───────── v0.4.2
 Installed Juno ────────── v0.5.3
 Installed Flux ────────── v0.6.8
  Updating `~/.julia/environments/v1.0/Project.toml`
  [587475ba] + Flux v0.6.8
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [1520ce14] + AbstractTrees v0.2.0
  [79e6a3ab] + Adapt v0.4.0
  [587475ba] + Flux v0.6.8
  [e5e0dc1b] + Juno v0.5.3
  [e89f7d12] + Media v0.4.1
  [872c559c] + NNlib v0.4.2
  [a5390f91] + ZipFile v0.7.0