# Vscode julia language server cannot load on recent nixos

**URL:** <https://discourse.julialang.org/t/vscode-julia-language-server-cannot-load-on-recent-nixos/125352>\
**Category:** General Usage\
**Tags:** vscode, nixos\
**Created:** [January 29, 2025, 4:29pm UTC](https://discourse.julialang.org/t/vscode-julia-language-server-cannot-load-on-recent-nixos/125352 "2025-01-29T16:29:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [January 29, 2025, 4:29pm UTC](https://discourse.julialang.org/t/vscode-julia-language-server-cannot-load-on-recent-nixos/125352/1 "2025-01-29T16:29:17Z")

</div>

after upgrading my nixos, the juliaup julia process cannot start the vscode language server because of some curl dependency.  
Is this not managed inside julia?

Usually on nixos things only break if the program depends implicitly on outside state…

Any help is highly appreciated. Running julia 1.11.3

```julia
ERROR: LoadError: InitError: could not load library "libcurl.so.4"
/run/current-system/sw/share/nix-ld/lib/libcurl.so.4: undefined symbol: libssh2_session_callback_set2

```

EDIT: Here the full error stacktrace

```julia
[ Info: Starting LS with Julia 1.11.3
ERROR: LoadError: InitError: could not load library "libcurl.so.4"
/run/current-system/sw/share/nix-ld/lib/libcurl.so.4: undefined symbol: libssh2_session_callback_set2
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen (repeats 2 times)
    @ ./libdl.jl:119 [inlined]
  [3] __init__ ()
    @ LibCURL_jll ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/LibCURL_jll/src/LibCURL_jll.jl:29
  [4] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1378
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1366
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1254
  [7] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1210 [inlined]
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:2041
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2527
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [11] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [12] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [14] macro expansion
    @ ./loading.jl:2314 [inlined]
 [15] macro expansion
    @ ./lock.jl:273 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [17] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [18] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
during initialization of module LibCURL_jll
in expression starting at /home/ssahm/.vscode-oss/extensions/julialang.language-julia-1.127.2-universal/scripts/languageserver/main.jl:7
[Error - 9:54:19 AM] Server process exited with code 1.
[Error - 9:54:19 AM] Server initialization failed.

```

EDIT: insight  
If I understand the error correctly, nixos sets some LD\_LIBRARY\_PATH for the julia process which somehow is taken into account by `LibCURL_jll` on an rebuild of `Pkg`. I would expect `LibCURL_jll` to definitely use its wrapped curl instead of looking outside, but this seems not true.

---

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [January 30, 2025, 9:27am UTC](https://discourse.julialang.org/t/vscode-julia-language-server-cannot-load-on-recent-nixos/125352/2 "2025-01-30T09:27:37Z")

</div>

I can confirm that by overloading NIX\_LD\_LIBRARY\_PATH with a path which does not include curl everything works.

It would be great if building LibCURL\_jll is resistant against LD\_LIBRARY\_PATH settings
