Incomplete installation reported when importing package for the first time

I installed the Plots package, but I get the following error when trying to compile it. I am using version 1.5.3 on Ubuntu. While installing this package, there was an interruption in between. What could I do to solve this problem ?

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
Your GR installation is incomplete. Rerun build step for GR package.
ERROR: LoadError: LoadError: InitError: Evaluation into the closed module `GR` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `GR` with `eval` during precompilation - don't do this.
Stacktrace:
 [1] eval at ./boot.jl:331 [inlined]
 [2] __init__() at /home/nodi/.julia/packages/GR/RlE5Y/src/GR.jl:274
 [3] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [4] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:782
 [5] _require(::Base.PkgId) at ./loading.jl:1007
 [6] require(::Base.PkgId) at ./loading.jl:928
 [7] require(::Module, ::Symbol) at ./loading.jl:923
 [8] include(::Function, ::Module, ::String) at ./Base.jl:380
 [9] include at ./Base.jl:368 [inlined]
 [10] include(::String) at /home/nodi/.julia/packages/Plots/vsE7b/src/Plots.jl:1
 [11] top-level scope at /home/nodi/.julia/packages/Plots/vsE7b/src/Plots.jl:212
 [12] include(::Function, ::Module, ::String) at ./Base.jl:380
 [13] include(::Module, ::String) at ./Base.jl:368
 [14] top-level scope at none:2
 [15] eval at ./boot.jl:331 [inlined]
 [16] eval(::Expr) at ./client.jl:467
 [17] top-level scope at ./none:3
during initialization of module GR
in expression starting at /home/nodi/.julia/packages/Plots/vsE7b/src/backends/gr.jl:6
in expression starting at /home/nodi/.julia/packages/Plots/vsE7b/src/Plots.jl:212
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/nodi/.julia/compiled/v1.5/Plots/ld3vC_OHNrH.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

You may try adding it again. I too interrupted(ctrl - c) it while installing the package. After that I again added it
] add Plots

and now it works.

That didn’t work, as I show below

julia> Pkg.add("Plots")
  Resolving package versions...
No Changes to `~/.julia/environments/v1.5/Project.toml`
No Changes to `~/.julia/environments/v1.5/Manifest.toml`

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
Your GR installation is incomplete. Rerun build step for GR package.
ERROR: LoadError: LoadError: InitError: Evaluation into the closed module `GR` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `GR` with `eval` during precompilation - don't do this.
Stacktrace:
 [1] eval at ./boot.jl:331 [inlined]
 [2] __init__() at /home/nodi/.julia/packages/GR/RlE5Y/src/GR.jl:274
 [3] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
 [4] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:782
 [5] _require(::Base.PkgId) at ./loading.jl:1007
 [6] require(::Base.PkgId) at ./loading.jl:928
 [7] require(::Module, ::Symbol) at ./loading.jl:923
 [8] include(::Function, ::Module, ::String) at ./Base.jl:380
 [9] include at ./Base.jl:368 [inlined]
 [10] include(::String) at /home/nodi/.julia/packages/Plots/vsE7b/src/Plots.jl:1
 [11] top-level scope at /home/nodi/.julia/packages/Plots/vsE7b/src/Plots.jl:212
 [12] include(::Function, ::Module, ::String) at ./Base.jl:380
 [13] include(::Module, ::String) at ./Base.jl:368
 [14] top-level scope at none:2
 [15] eval at ./boot.jl:331 [inlined]
 [16] eval(::Expr) at ./client.jl:467
 [17] top-level scope at ./none:3
during initialization of module GR
in expression starting at /home/nodi/.julia/packages/Plots/vsE7b/src/backends/gr.jl:6
in expression starting at /home/nodi/.julia/packages/Plots/vsE7b/src/Plots.jl:212
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/nodi/.julia/compiled/v1.5/Plots/ld3vC_OHNrH.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

I found it on this link
I have to rebuild the Plots package :
Pkg.build(“Plots”)

1 Like