Error in REPL when entering package mode in Julia 1.11

I installed the new Julia version 1.11 using juliaup on my linux machine.

I start julia without any flags. My startup.jl script is empty.

If enter package mode and attempt to install a package to my empty registry, using e.g. add Optim, I get the following error below.

To be absolutely precise:
(1) I enter package mode and see the “pkg>” on the left.
(2) I type "add "
(3) The instant I type the character “O”, I get the error message below, before having the chance to finish typing “Optim” .

I wonder if other users have also encountered something similar when using the new Julia version.

The error message:

add ┌ Error: Error in the keymap
│   exception =
│    IOError: stat("Templates"): too many symbolic links encountered (ELOOP)
│    Stacktrace:
│      [1] uv_error
│        @ ./libuv.jl:106 [inlined]
│      [2] stat(path::String)
│        @ Base.Filesystem ./stat.jl:176
│      [3] isdir
│        @ ./stat.jl:494 [inlined]
│      [4] (::REPLExt.var"#3#6"{String, Int64, UnitRange{Int64}})(x::String)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:42
│      [5] filter!(f::REPLExt.var"#3#6"{String, Int64, UnitRange{Int64}}, a::Vector{String})
│        @ Base ./array.jl:2905
│      [6] complete_expanded_local_dir(s::String, i1::Int64, i2::Int64, expanded_user::Bool, oldi2::Int64)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:40
│      [7] complete_local_dir(s::String, i1::Int64, i2::Int64)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:33
│      [8] complete_add_dev(options::Dict{Symbol, Any}, partial::String, i1::Int64, i2::Int64; hint::Bool)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:156
│      [9] complete_add_dev
│        @ ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:155 [inlined]
│     [10] #34#35
│        @ ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:207 [inlined]
│     [11] complete_argument(spec::Pkg.REPLMode.CommandSpec, options::Vector{String}, partial::String, offset::Int64, index::Int64; hint::Bool)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:221
│     [12] _completions(input::String, final::Bool, offset::Int64, index::Int64; hint::Bool)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:247
│     [13] _completions
│        @ ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:224 [inlined]
│     [14] completions(full::String, index::Int64; hint::Bool)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:278
│     [15] completions
│        @ ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/completions.jl:266 [inlined]
│     [16] complete_line(c::REPLExt.PkgCompletionProvider, s::REPL.LineEdit.PromptState; hint::Bool)
│        @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:29
│     [17] complete_line(c::REPL.LineEdit.CompletionProvider, s::Any, ::Module; hint::Bool)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:188
│     [18] check_for_hint(s::REPL.LineEdit.MIState)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:385
│     [19] (::REPL.LineEdit.var"#143#199")(s::REPL.LineEdit.MIState, data::Any, c::Union{Char, SubString{String}, String})
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2521
│     [20] #invokelatest#2
│        @ ./essentials.jl:1054 [inlined]
│     [21] invokelatest
│        @ ./essentials.jl:1051 [inlined]
│     [22] (::REPL.LineEdit.var"#30#31"{REPL.LineEdit.var"#143#199", String})(s::Any, p::Any)
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:1705
│     [23] macro expansion
│        @ ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2855 [inlined]
│     [24] macro expansion
│        @ ./lock.jl:273 [inlined]
│     [25] (::REPL.LineEdit.var"#282#284"{REPL.Terminals.TTYTerminal, REPL.LineEdit.ModalInterface, REPL.LineEdit.MIState, ReentrantLock, REPL.LineEdit.Prompt})()
│        @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2845
└ @ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2857

(see also related thread here)

julia> versioninfo()
Julia Version 1.11.0
Commit 501a4f25c2b (2024-10-07 11:40 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 20 × 13th Gen Intel(R) Core™ i9-13900H
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, goldmont)
Threads: 1 default, 0 interactive, 1 GC (on 20 virtual cores)

1 Like

Known issue, most likely already fixed and the fix will hopefully become available with 1.11.1: Don't show keymap `@error` for hints by IanButterworth · Pull Request #56041 · JuliaLang/julia · GitHub

Open question: Is there a workaround available for the users that are affected?

Thanks for the answer. At least I know it is not a problem specific to my setup.

I mean, this is an error specific to your setup:

 IOError: stat("Templates"): too many symbolic links encountered (ELOOP) 

The upcoming fix is not to display this error.

This might be worth reading to figure out how to fix the underlying error: Reddit - Dive into anything

Thanks again. I don’t completely understand what is going on with my setup. I decided to download the Julia binary file, as opposed to installing Julia using juliaup as I did above. I extracted the contents and started Julia.

Now I get a different error the instant I enter package mode without typing anything further:

(@v1.11) pkg> Unhandled Task ERROR: ArgumentError: Package REPLExt [e5eb5ef1-03cf-53a7-ae1d-5a66b08e832b] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
  [1] _require(pkg::Base.PkgId, env::Nothing)
    @ Base ./loading.jl:2423
  [2] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
    @ Base ./loading.jl:2300
  [3] #invoke_in_world#3
    @ ./essentials.jl:1088 [inlined]
  [4] invoke_in_world
    @ ./essentials.jl:1085 [inlined]
  [5] _require_prelocked
    @ ./loading.jl:2287 [inlined]
  [6] _require_prelocked
    @ ./loading.jl:2286 [inlined]
  [7] macro expansion
    @ ./loading.jl:2587 [inlined]
  [8] macro expansion
    @ ./lock.jl:273 [inlined]
  [9] require_stdlib(package_uuidkey::Base.PkgId, ext::String)
    @ Base ./loading.jl:2542
 [10] macro expansion
    @ ~/julia-1.11.0/share/julia/stdlib/v1.11/REPL/src/Pkg_beforeload.jl:8 [inlined]
 [11] macro expansion
    @ ./lock.jl:273 [inlined]
 [12] load_pkg()
    @ REPL ~/julia-1.11.0/share/julia/stdlib/v1.11/REPL/src/Pkg_beforeload.jl:7
 [13] (::REPL.var"#119#137"{REPL.LineEdit.MIState, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ REPL ~/julia-1.11.0/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1233
2 Likes

I have the same problem. did you fix it?

I am afraid not. I’ve got the same problem also with v1.11.1.

I have an update. for me the problem is solved if I use the following setting

julia --startup=no -p 1 -t 1 -ie "@time using Pkg"

the problem is that I do not know how to implement this setup in VScode. perhaps you can check if this fixing works for you.

It seems (but I am not sure as I have been trying out many things) that the problem disappeared after doing the following:
(1) Freshly installed the latest julia i.e. 1.11.1
(2) Started Julia and executed using Pkg in the REPL
(3) After getting in package mode, I executed registry add https://github.com/JuliaRegistries/General

Now it seems to work and I have not encountered any problems so far…

mmm… during the cloning I get the non-encouraging error

Error: curl_multi_assign: 1=======>                   ]  52.1 %
└ @ Downloads.Curl /usr/share/julia/stdlib/v1.11/Downloads/src/Curl/utils.jl:57

That’s something I have not encountered before.