# Cannot Precompile Plots.jl due to GR

**URL:** <https://discourse.julialang.org/t/cannot-precompile-plots-jl-due-to-gr/88230>\
**Category:** General Usage\
**Created:** [October 4, 2022, 1:27pm UTC](https://discourse.julialang.org/t/cannot-precompile-plots-jl-due-to-gr/88230 "2022-10-04T13:27:25Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [August 3, 2023, 3:05pm UTC](https://discourse.julialang.org/t/cannot-precompile-plots-jl-due-to-gr/88230/17 "2023-08-03T15:05:25Z")

</div>

This error may be resolved as described in this post:

> [@Plots, InitError: UndefVarError: GR\_jll not defined](https://discourse.julialang.org/t/plots-initerror-undefvarerror-gr-jll-not-defined/102448):
>
> In some circumstances, a user may encounter the following error. Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "~/.julia/compiled/v1.9/Plots/jl\_crbDAx". ERROR: LoadError: InitError: UndefVarError: `GR_jll` not defined Stacktrace: [1] \_\_init\_\_() @ GR.GRPreferences ~/.julia/packages/GR/jehu0/src/preferences.jl:64

In short, run the following and then restart Julia.

```julia
Base.compilecache(Base.identify_package("GR"))

```

---

_[View the full topic](https://discourse.julialang.org/t/cannot-precompile-plots-jl-due-to-gr/88230)._
