# ERROR: LoadError: InitError: UndefVarError: \`GR\_jll\` not defined

**URL:** https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945
**Category:** General Usage
**Tags:** question, package, plots
**Created:** [February 29, 2024, 12:13pm UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945 "2024-02-29T12:13:02Z")
**Posts on this page:** 1
**Showing post:** 28

<div class="post-metadata">

### Author: ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)
#### Post date: [March 1, 2024, 8:31am UTC](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945/28 "2024-03-01T08:31:15Z")

</div>

> [@Plots, InitError: UndefVarError: GR\_jll not defined](https://discourse.julialang.org/t/plots-initerror-undefvarerror-gr-jll-not-defined/102448/2):
>
> A persistent error such as this may require the following command to force GR to recompile. Base.compilecache(Base.identify\_package("GR")) This situation occurs due to some initial problem with loading GR\_jll on this line: However, due to the surrounding try-catch the problem is ignored and compilation continues. Once the compilation succeeds, the issue may persist if Julia fails to recognize the need to invalidate the compile cache for GR. If the above does not resolve the issue, first as…

I made a new attempt, referring to the above operations:

1. Create a new folder `D:/NewEnv` and `activate` it in julia pkg mode.
2. `(NewEnv) pkg> add GR_jll` , `(NewEnv) pkg> pin GR_jll@0.72.8` and `julia> import GR_jll`.
3. `(NewEnv) pkg> add GR`,  
`julia> Base.compilecache(Base.identify_package("GR"))`, and  
`using GR`.
4. `GR.plot(rand(10))` and it reports:

```julia
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x1338b47 -- jl_svecref at C:/workdir/src\julia.h:989 [inlined]
jl_array_grow_at_end at C:/workdir/src\array.c:880
in expression starting at REPL[8]:1
jl_svecref at C:/workdir/src\julia.h:989 [inlined]
jl_array_grow_at_end at C:/workdir/src\array.c:880
ijl_array_grow_end at C:/workdir/src\array.c:955
_growend! at .\array.jl:1014 [inlined]
push! at .\array.jl:1061 [inlined]
load_libs at C:\Users\Admin\.julia\packages\GR\CMI3m\src\funcptrs.jl:54
init at C:\Users\Admin\.julia\packages\GR\CMI3m\src\GR.jl:305
init at C:\Users\Admin\.julia\packages\GR\CMI3m\src\GR.jl:304 [inlined]
plot_data at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1177
plot_data at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1173 [inlined]
plot_data at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1173 [inlined]
#plot#39 at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1746
plot at C:\Users\Admin\.julia\packages\GR\CMI3m\src\jlgr.jl:1737
unknown function (ip: 1a3f8925)
_jl_invoke at C:/workdir/src\gf.c:2758 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:226
eval_stmt_value at C:/workdir/src\interpreter.c:177 [inlined]
eval_body at C:/workdir/src\interpreter.c:606
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:762
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:912
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:856
ijl_toplevel_eval at C:/workdir/src\toplevel.c:921 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:971
eval at .\boot.jl:370 [inlined]
eval_user_input at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:153
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:249
#start_repl_backend#46 at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:234
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:231
jl_fptr_args at C:/workdir/src\gf.c:2405
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
#run_repl#59 at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:379
run_repl at C:\workdir\usr\share\julia\stdlib\v1.9\REPL\src\REPL.jl:365
jfptr_run_repl_60824 at D:\Software\julia-1.9.4\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
#1018 at .\client.jl:421
jfptr_YY.1018_55137 at D:\Software\julia-1.9.4\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:774
#invokelatest#2 at .\essentials.jl:819 [inlined]
invokelatest at .\essentials.jl:816 [inlined]
run_main_repl at .\client.jl:405
exec_options at .\client.jl:322
_start at .\client.jl:522
jfptr__start_45063 at D:\Software\julia-1.9.4\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2739 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:2940
jl_apply at C:/workdir/src\julia.h:1880 [inlined]
true_main at C:/workdir/src\jlapi.c:573
jl_repl_entrypoint at C:/workdir/src\jlapi.c:717
jl_load_repl at C:/workdir/cli\loader_lib.c:529
mainCRTStartup at C:/workdir/cli\loader_exe.c:59
BaseThreadInitThunk at C:\Windows\system32\kernel32.dll (unknown line)
RtlInitializeExceptionChain at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlInitializeExceptionChain at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 13682505 (Pool: 13677265; Big: 5240); GC: 40
PS D:\NewEnv>

```

How I wish it worked…

---

_[View the full topic](https://discourse.julialang.org/t/error-loaderror-initerror-undefvarerror-gr-jll-not-defined/110945)._
