# IJulia error syntax: undefined reference in AST

**URL:** <https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958>\
**Category:** General Usage\
**Tags:** package\
**Created:** [November 11, 2020, 12:10am UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958 "2020-11-11T00:10:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [November 11, 2020, 12:10am UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/1 "2020-11-11T00:10:24Z")

</div>

Suddenly when I try to start up IJulia and run any code in a Jupyter notebook or jupyter lab (e.g. just return the number `1`), I get an error:

```julia
syntax: undefined reference in AST

Stacktrace:
 [1] top-level scope at In[1]:0
 [2] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
 [3] execute_code(::String, ::String) at /home/mason/.julia/packages/IJulia/a1SNk/src/execute_request.jl:27
 [4] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/mason/.julia/packages/IJulia/a1SNk/src/execute_request.jl:86
 [5] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [6] invokelatest at ./essentials.jl:709 [inlined]
 [7] eventloop(::ZMQ.Socket) at /home/mason/.julia/packages/IJulia/a1SNk/src/eventloop.jl:8
 [8] (::IJulia.var"#15#18")() at ./task.jl:356

```

I am on a rolling release Linux distro (manjaro) so I suspect that a update to Jupyter or one of Jupyter’s dependencies broke this.

Does anyone have advice to help me diagnose this issue? I’d really appreciate the help. I tried updating `IJulia`, running `build IJulia`, deleting and reinstalling `IJulia`, etc.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [November 11, 2020, 12:16am UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/2 "2020-11-11T00:16:54Z")

</div>

Hm, I managed to uninstall Jupyter from my machine and then reinstalling `IJulia.jl` prompted me to install Jupyter via Conda.

Unfortunately, the error did not go away.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [November 11, 2020, 12:19am UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/3 "2020-11-11T00:19:06Z")

</div>

Upgraded to 1.5.3 this afternoon. Tried IJulia when I saw this post and had no problems.

Running 1.5.3 on a Mac with the latest OS.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [November 11, 2020, 12:19am UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/4 "2020-11-11T00:19:43Z")

</div>

Yeah, I got this error on 1.5.2. This is unrelated to the julia version. I have upgraded to 1.5.3 and that has also not fixed the issue.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [November 11, 2020, 1:03am UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/5 "2020-11-11T01:03:53Z")

</div>

Opened an issue: [https://github.com/JuliaLang/IJulia.jl/issues/960](https://github.com/JuliaLang/IJulia.jl/issues/960)

---

<div class="post-metadata">

**Author:** ![Babber](https://avatars.discourse-cdn.com/v4/letter/b/7cd45c/32.png) [@Babber](https://discourse.julialang.org/u/Babber)\
**Post date:** [November 11, 2020, 1:20pm UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/6 "2020-11-11T13:20:16Z")

</div>

This solved it for me:

1. Close all Julia sessions
2. Remove all content of `~/.julia/packages/IJulia/` and `~/.julia/compiled/v1.5/IJulia/`
3. In REPL of v1.5.3:

```julia
using Pkg
Pkg.add(Pkg.PackageSpec(;name="IJulia", version="1.21.3"))

```

1. Launch Jupyter, it should work now.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [November 11, 2020, 4:53pm UTC](https://discourse.julialang.org/t/ijulia-error-syntax-undefined-reference-in-ast/49958/7 "2020-11-11T16:53:23Z")

</div>

That did it, thanks!
