# Plots failed to precompile due to Error in libgobject-2.0.so and libQt5Concurrent.so

**URL:** https://discourse.julialang.org/t/plots-failed-to-precompile-due-to-error-in-libgobject-2-0-so-and-libqt5concurrent-so/89890
**Category:** New to Julia
**Tags:** question, plots, glib\_jll
**Created:** [November 7, 2022, 3:59pm UTC](https://discourse.julialang.org/t/plots-failed-to-precompile-due-to-error-in-libgobject-2-0-so-and-libqt5concurrent-so/89890 "2022-11-07T15:59:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dchang10](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dchang10/32/44162_2.png) [@dchang10](https://discourse.julialang.org/u/dchang10)
#### Post date: [November 7, 2022, 3:59pm UTC](https://discourse.julialang.org/t/plots-failed-to-precompile-due-to-error-in-libgobject-2-0-so-and-libqt5concurrent-so/89890/1 "2022-11-07T15:59:06Z")

</div>

Hello. I am trying to run my julia project on my school’s cluster. They have pre installed a Julia v1.7.1 Linux x86 binary. Adding Plots in the Pkg interface causes pre-compilation to fail:

```julia
Precompiling project...
  ✗ Plots
  19 dependencies successfully precompiled in 46 seconds (114 already precompiled)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package

```

Running Pkg.precompile() results in no output. If I then import Plots into my current session, I end up with the following error:

```julia
julia> using Plots
ERROR: InitError: could not load library "/n/home06/dochang/.julia/artifacts/303fe895f57042ea41055187ec4af6322989b5cc/lib/libgobject-2.0.so"
/n/home06/dochang/.julia/artifacts/303fe895f57042ea41055187ec4af6322989b5cc/lib/libgobject-2.0.so: undefined symbol: g_pattern_spec_copy
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:117
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__ ()
    @ Glib_jll ~/.julia/packages/Glib_jll/lyJkt/src/wrappers/x86_64-linux-gnu.jl:36
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:768
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:854
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:783
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:843
  [9] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:783
 [10] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:843
 [11] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1097
 [12] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
 [13] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
during initialization of module Glib_jll

```

I get a completely different error if I try importing again in the same session:

```julia
julia> using Plots
ERROR: InitError: could not load library "/n/home06/dochang/.julia/artifacts/988066cc974e30c89774b0c471f47201975a4423/lib/libQt5Concurrent.so"
/n/home06/dochang/.julia/artifacts/988066cc974e30c89774b0c471f47201975a4423/lib/libQt5Concurrent.so: cannot open shared object file: No such file or directory
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:117
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
  [4] __init__ ()
    @ Qt5Base_jll ~/.julia/packages/Qt5Base_jll/lpIK6/src/wrappers/x86_64-linux-gnu-cxx11.jl:31
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:768
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:854
  [7] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
    @ Base ./loading.jl:783
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:843
  [9] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1097
 [10] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
during initialization of module Qt5Base_jll

```

Importing a third time just results in the same error as the second. I’ve tried changing my `.julia/config/startup.jl` to include:

```julia
ENV["LD_LIBRARY_PATH"] = ""

```

since I’ve seen this given as a solution in [another post](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-initerror-in-libgobject-2-0-so-undefined-symbol-g-pattern-spec-copy/88900); but this failed to resolve my problem.

Does anyone know how to resolve this? Help would be greatly appreciated.

---

<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: [November 8, 2022, 1:24am UTC](https://discourse.julialang.org/t/plots-failed-to-precompile-due-to-error-in-libgobject-2-0-so-and-libqt5concurrent-so/89890/2 "2022-11-08T01:24:17Z")

</div>

> [@dchang10](#):
>
> I’ve tried changing my `.julia/config/startup.jl` to include:
> 
> ```julia
> ENV["LD_LIBRARY_PATH"] = ""
> 
> ```
> 
> since I’ve seen this given as a solution in [another post](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-initerror-in-libgobject-2-0-so-undefined-symbol-g-pattern-spec-copy/88900); but this failed to resolve my problem.

That’s not what [I suggested](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-initerror-in-libgobject-2-0-so-undefined-symbol-g-pattern-spec-copy/88900/8). My suggestion was to set the environment variable _ **before** _ starting the Julia process, setting the environment variable inside the Julia process has no effect with regards to loading libraries in-process.

---

<div class="post-metadata">

### Author: ![dchang10](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dchang10/32/44162_2.png) [@dchang10](https://discourse.julialang.org/u/dchang10)
#### Post date: [November 9, 2022, 2:26am UTC](https://discourse.julialang.org/t/plots-failed-to-precompile-due-to-error-in-libgobject-2-0-so-and-libqt5concurrent-so/89890/3 "2022-11-09T02:26:56Z")

</div>

Thanks! I misunderstood. That seemed to have fixed my issue.
