Error installing packages: could not spawn setenv(`lld -flavor gnu`)

Environment: OS: Pop!_OS 22.04 LTS / Processor: 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz × 8 / 16 GB RAM / 500 GB SSD

Following E. Nagel’s very helpful comment on page Install IJulia | JuliaAcademy, I get in trouble at:
.
.
then “using IJulia”
.
.

Terminal output:

julia> using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: IOError: could not spawn setenv(`lld -flavor gnu '' -shared -o /home/tomc/.julia/compiled/v1.9/Preferences/jl_R2zpNb --whole-archive /home/tomc/.julia/compiled/v1.9/Preferences/jl_PFTT5T --no-whole-archive -L/usr/lib -L/usr/lib/julia -L/usr/lib -ljulia -ljulia-internal`,["PATH=:/home/tomc/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/tomc/Dropbox/restic-backup/restic-backup-scripts/", "QT_ACCESSIBILITY=1", "LD_LIBRARY_PATH=/usr/lib/julia:/usr/lib", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus", "XDG_CURRENT_DESKTOP=pop:GNOME", "LANG=en_US.UTF-8", "LOGNAME=tomc", "GNOME_DESKTOP_SESSION_ID=this-is-deprecated", "XDG_SESSION_DESKTOP=pop", "SHLVL=1", "XDG_RUNTIME_DIR=/run/user/1000", "SSH_AUTH_SOCK=/run/user/1000/keyring/ssh", "DESKTOP_SESSION=pop", "GTK3_MODULES=xapp-gtk3-module", "JULIA_IMAGE_THREADS=1", "XDG_SESSION_TYPE=x11", "SYSTEMD_EXEC_PID=21140", "_=/usr/bin/julia", "OPENBLAS_DEFAULT_NUM_THREADS=1", "GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1", "USER=tomc", "XDG_CONFIG_DIRS=/etc/xdg/xdg-pop:/etc/xdg", "LESSCLOSE=/usr/bin/lesspipe %s %s", "QT_IM_MODULE=ibus", "GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/87d33039_c5b9_4d11_87dc_5778a0a68337", "JULIA_NUM_THREADS=1", "GNOME_TERMINAL_SERVICE=:1.124", "GNOME_SHELL_SESSION_MODE=pop", "PWD=/home/tomc", "USERNAME=tomc", "XDG_SESSION_CLASS=user", "DISPLAY=:1", "LESSOPEN=| /usr/bin/lesspipe %s", "XDG_DATA_DIRS=/usr/share/pop:/usr/share/gnome:/home/tomc/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop", "GDMSESSION=pop", "SHELL=/bin/bash", "OPENBLAS_NUM_THREADS=1", "XAUTHORITY=/run/user/1000/gdm/Xauthority", "XDG_MENU_PREFIX=gnome-", "GTK_MODULES=gail:atk-bridge:appmenu-gtk-module", "GTK_IM_MODULE=ibus", "SESSION_MANAGER=local/sys76-pop-os:@/tmp/.ICE-unix/3287,unix/sys76-pop-os:/tmp/.ICE-unix/3287", "XMODIFIERS=@im=ibus", "JULIA_LOAD_PATH=/home/tomc/.julia/environments/v1.9/Project.toml:/usr/share/julia/stdlib/v1.9", "SSH_AGENT_LAUNCHER=gnome-keyring", "HOME=/home/tomc", "TERM=xterm-256color", "WINDOWPATH=2", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:", "COLORTERM=truecolor", "OPENBLAS_MAIN_FREE=1", "VTE_VERSION=6800"]): no such file or directory (ENOENT)
Stacktrace:
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Union{RawFD, IO}})
    @ Base ./process.jl:128
  [2] #760
    @ ./process.jl:139 [inlined]
  [3] setup_stdios(f::Base.var"#760#761"{Cmd}, stdios::Vector{Union{RawFD, IO}})
    @ Base ./process.jl:223
  [4] _spawn
    @ ./process.jl:138 [inlined]
  [5] run(::Cmd, ::Base.DevNull, ::Vararg{Any}; wait::Bool)
    @ Base ./process.jl:479
  [6] run
    @ ./process.jl:477 [inlined]
  [7] link_image (repeats 2 times)
    @ ./linking.jl:166 [inlined]
  [8] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2202
  [9] compilecache
    @ ./loading.jl:2163 [inlined]
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
 [11] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
 [12] macro expansion
    @ ./loading.jl:1648 [inlined]
 [13] macro expansion
    @ ./lock.jl:267 [inlined]
 [14] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
 [15] top-level scope
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/JLLWrappers.jl:8
 [16] include
    @ ./Base.jl:457 [inlined]
 [17] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2045
 [18] top-level scope
    @ stdin:3
in expression starting at /home/tomc/.julia/packages/JLLWrappers/QpMQW/src/JLLWrappers.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] to "/home/tomc/.julia/compiled/v1.9/JLLWrappers/jl_zJmqwT".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2296
  [3] compilecache
    @ ./loading.jl:2163 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] include
    @ ./Base.jl:457 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2045
 [11] top-level scope
    @ stdin:3
in expression starting at /home/tomc/.julia/packages/ZeroMQ_jll/IrSBB/src/ZeroMQ_jll.jl:2
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile ZeroMQ_jll [8f1865be-045e-5c20-9c9f-bfbfb0764568] to "/home/tomc/.julia/compiled/v1.9/ZeroMQ_jll/jl_HYsmjE".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2296
  [3] compilecache
    @ ./loading.jl:2163 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] include
    @ ./Base.jl:457 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2045
 [11] top-level scope
    @ stdin:3
in expression starting at /home/tomc/.julia/packages/ZMQ/lrABE/src/ZMQ.jl:3
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] to "/home/tomc/.julia/compiled/v1.9/ZMQ/jl_Y6hgrx".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2296
  [3] compilecache
    @ ./loading.jl:2163 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] include
    @ ./Base.jl:457 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2045
 [11] top-level scope
    @ stdin:3
in expression starting at /home/tomc/.julia/packages/IJulia/Vo51o/src/IJulia.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to "/home/tomc/.julia/compiled/v1.9/IJulia/jl_i3ulVb".
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:2296
 [3] compilecache
   @ ./loading.jl:2163 [inlined]
 [4] _require(pkg::Base.PkgId, env::String)
   @ Base ./loading.jl:1805
 [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
   @ Base ./loading.jl:1660
 [6] macro expansion
   @ ./loading.jl:1648 [inlined]
 [7] macro expansion
   @ ./lock.jl:267 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1611

julia> 

What should I do?

@tomc Stick with it. There are a lot of helpful people here.
My rather useless contribution - consider using Pluto notebooks. I have never had a problem installing or running Pluto.

My bad - you are following a course. My advice is not relevant.

1 Like

Hi,
welcome to Julia discourse!

I could not access your link, since I am not subscribed to the course. Also, could you provide a bit more information for example about your OS?
Maybe also check this thread – for example to make your code / error message easier readable Please read: make it easier to help you.

A lot of helpful people? Already, that is SO clear. This forum is matching my extraordinary experience with the Lilypond music score engraving software forum - absolutely head and shoulders above anything else ever experienced. I am delighted to be here.

As for mentioning Pluto.jl - thanks anyway. Experience counts, and I appreciate hearing about yours. I will check out this alternative environment simply to learn what it offers.

1 Like

It doesn’t look like this has anything to do with IJulia — I suspect that the same error occurs when you try to precompile any package? (Try installing anything else, e.g. try using VersionParsing for a little package with no dependencies.)

If you google this error message, it turns up the thread julia#49718. From the sound of it, this occurs when using a broken julia installation provided with your OS distribution. The recommendation there is to install Julia via juliaup instead.

1 Like

YES! I prepared a post about this 5 min. ago but was unable to post it due to limitations on number of posts allow new folks here.

Will follow your much appreciated recommendation.

Sigh. Yeah. I should have done that. I’m moving fast, and learning fast. Thanks.

The advice to use Julia up is good.
Give that a try and report back if that is successful.

I’m on it. Thanks.

UPDATE: apparent success:

(@v1.9) pkg> up
    Updating registry at `~/.julia/registries/General.toml`
   Installed HTTP ─ v1.9.13
  No Changes to `~/.julia/environments/v1.9/Project.toml`
    Updating `~/.julia/environments/v1.9/Manifest.toml`
  [cd3eb016] ↑ HTTP v1.9.12 ⇒ v1.9.13
  [44cfe95a] ↑ Pkg v1.9.0 ⇒ v1.9.2
Precompiling project...
  ✗ IJulia
  34 dependencies successfully precompiled in 47 seconds. 3 already precompiled.
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

then:

(@v1.9) pkg> add IJulia
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.9/Project.toml`
  No Changes to `~/.julia/environments/v1.9/Manifest.toml`

Thank so much!

1 Like