Install Plots: ERROR: KeyError: key "Zlib_jll" not found

Fresh install and fresh active project…

(Julia) pkg> add Plots
Resolving package versions…
ERROR: KeyError: key “Zlib_jll” not found

Any Ideas?

1 Like

What version of Julia?

1.5.1

what is the project you activated? i.e why does it say (julia) instead of (@1.5)

I’m in a folder named “Julia”

(Julia) pkg> activate .
 Activating environment at `...\Julia\Project.toml`

Nevermind… it started working… Not sure why.

Do you remember what you changed to make it work? I have the same problem, but it does not seem to magically disappear when I retry

Version: 1.5.1
Windows, 64 bit

Might be fixed in the upcoming 1.5.2.

Please paste the full stacktrace when this happens.

Unfortunately, I don’t think I changed anything significant.

I’m not sure how related this is to the problem but, setting up environments has been problematic and I’ve been receiving other errors. I have resorted to deleting the entire “general” folder where ~\general\registry.toml lives. Julia is frequently saying that it doesn’t exist when attempting to set up a new environment. Not sure if this issue is due to the package, pkg module, or a side effect of a deeper issue. I only received this error for that specific package.

I experience similar issue when using Julia environments in Windows.

For example, after an activate . in a new folder, trying to add Flux results in the following:

(test) pkg> add Flux
  Resolving package versions...
ERROR: KeyError: key "Zlib_jll" not found
Stacktrace:
 [1] getindex at .\dict.jl:467 [inlined]
 [2] #37 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\manifest.jl:215 [inlined]
 [3] _all(::Pkg.Types.var"#37#40"{Dict{String,Bool}}, ::Dict{String,Base.UUID}, ::Colon) at .\reduce.jl:828
 [4] all at .\reduce.jl:823 [inlined]
 [5] destructure(::Dict{Base.UUID,Pkg.Types.PackageEntry}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\manifest.jl:215
 [6] write_manifest at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\manifest.jl:233 [inlined]
 [7] write_manifest at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\manifest.jl:231 [inlined]
 [8] write_env(::Pkg.Types.EnvCache; update_undo::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Types.jl:1367
 [9] write_env at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Types.jl:1366 [inlined]
 [10] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1143
 [11] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:188
 [12] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:139
 [13] #add#21 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
 [14] add(::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67
 [15] do_cmd!(::Pkg.REPLMode.Command, ::REPL.LineEditREPL) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\REPLMode\REPLMode.jl:404
 [16] do_cmd(::REPL.LineEditREPL, ::String; do_rethrow::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\REPLMode\REPLMode.jl:382
 [17] do_cmd at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\REPLMode\REPLMode.jl:377 [inlined]
 [18] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\REPLMode\REPLMode.jl:546
 [19] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [20] invokelatest at .\essentials.jl:709 [inlined]
 [21] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\LineEdit.jl:2355
 [22] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:1144
 [23] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at .\task.jl:356

I am experiencing the same problem. Do anyone find the issue?