# Could not spawn setenv error

**URL:** <https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734>\
**Category:** New to Julia\
**Created:** [August 11, 2023, 8:24pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734 "2023-08-11T20:24:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dogtired](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dogtired/32/52670_2.png) [@dogtired](https://discourse.julialang.org/u/dogtired)\
**Post date:** [August 11, 2023, 8:24pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/1 "2023-08-11T20:24:16Z")

</div>

I have installed Julia 1.9 on a POP OS system with i9-139000HX processor and am getting this error:

Activating project at `~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/environments/languageserver/v1.9`  
[ Info: Starting the Julia Language Server  
ERROR: LoadError: IOError: could not spawn setenv(`lld -flavor gnu '' -shared -o /home/dgriswold/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/JSON/jl_ziLoBz --whole-archive /home/dgriswold/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/JSON/jl_UepcM0 --no-whole-archive -L/usr/lib -L/usr/lib/julia -L/usr/lib -ljulia -ljulia-internal`,[“OPENBLAS\_DEFAULT\_NUM\_THREADS=1”, “PATH=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin”, “OPENBLAS\_NUM\_THREADS=1”, “LD\_LIBRARY\_PATH=/usr/lib/julia:/usr/lib”, “HOME=/home/dgriswold”, “JULIA\_LANGUAGESERVER=1”, “JULIA\_NUM\_THREADS=1”, “JULIA\_DEPOT\_PATH=/home/dgriswold/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1”, “JULIA\_LOAD\_PATH=/home/dgriswold/.vscode/extensions/julialang.language-julia-1.47.2/scripts/environments/languageserver/v1.9/Project.toml:/home/dgriswold/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/environments/v1.9/Project.toml:/usr/share/julia/stdlib/v1.9”, “OPENBLAS\_MAIN\_FREE=1”]): 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] include  
@ ./Base.jl:457 [inlined]  
[16] 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  
[17] top-level scope  
@ stdin:3  
in expression starting at /home/dgriswold/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/LanguageServer/src/LanguageServer.jl:1  
in expression starting at stdin:3

The Language Server failed to precompile.  
Please make sure you have permissions to write to the LS depot path at  
/home/dgriswold/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1

┌ Error: Some Julia code in the VS Code extension crashed  
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/error\_handler.jl:15  
ERROR: Failed to precompile LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7] to “/home/dgriswold/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/LanguageServer/jl\_AlupWq”.  
Stacktrace:  
[1] top-level scope  
@ ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/languageserver/main.jl:77  
[2] include(mod::Module, \_path::String)  
@ Base ./Base.jl:457  
[3] exec\_options(opts::Base.JLOptions)  
@ Base ./client.jl:307  
[4] \_start()  
@ Base ./client.jl:522  
[Error - 3:57:14 PM] Server initialization failed.  
Message: Pending response rejected since connection got disposed  
Code: -32097  
[Info - 3:57:14 PM] Connection to server got closed. Server will restart.  
true  
[Error - 3:57:14 PM] Julia Language Server client: couldn’t create connection to server.  
Message: Pending response rejected since connection got disposed  
Code: -32097

Any suggestions about where to start?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [August 12, 2023, 4:04pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/3 "2023-08-12T16:04:13Z")

</div>

How did you install Julia?

---

<div class="post-metadata">

**Author:** ![dogtired](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dogtired/32/52670_2.png) [@dogtired](https://discourse.julialang.org/u/dogtired)\
**Post date:** [August 12, 2023, 9:40pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/4 "2023-08-12T21:40:31Z")

</div>

I installed Julia through POP OS’s appstore.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [August 12, 2023, 10:19pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/5 "2023-08-12T22:19:36Z")

</div>

Sounds like they may be providing a broken installation of Julia, missing critical components like the lld linker. Try using the official binaries instead, that you can find at [Download Julia](https://julialang.org/downloads/), or use juliaup to automatically manage multiple installations; [GitHub - JuliaLang/juliaup: Julia installer and version multiplexer](https://github.com/JuliaLang/juliaup)

---

<div class="post-metadata">

**Author:** ![dogtired](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dogtired/32/52670_2.png) [@dogtired](https://discourse.julialang.org/u/dogtired)\
**Post date:** [August 13, 2023, 6:12am UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/6 "2023-08-13T06:12:41Z")

</div>

Thanks for the suggestion. I’ll let you know the outcome.

---

<div class="post-metadata">

**Author:** ![dogtired](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dogtired/32/52670_2.png) [@dogtired](https://discourse.julialang.org/u/dogtired)\
**Post date:** [August 13, 2023, 12:10pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/7 "2023-08-13T12:10:46Z")

</div>

I was able to successfully load julia with juliaup.

Thank you for taking the time to help me Mose!

Donald

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [August 13, 2023, 12:22pm UTC](https://discourse.julialang.org/t/could-not-spawn-setenv-error/102734/8 "2023-08-13T12:22:20Z")

</div>

Thanks for confirming it. You may want to report the problem to popos developers, providing a completely broken package isn’t a good look (although I’d prefer Linux distributions not to package Julia at all if they have to do it this wrong).
