# Installing GLMakie on Linux fails

**URL:** <https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468>\
**Category:** General Usage\
**Tags:** question, package, glmakie\
**Created:** [July 1, 2024, 11:35am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468 "2024-07-01T11:35:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 1, 2024, 11:35am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/1 "2024-07-01T11:35:58Z")

</div>

I did:

```julia
mkdir glmakie
cd glmakie
julia --project="."

```

and then in Julia

```julia
using Pkg
Pkg.add("GLMakie")

```

This results in the following error:

```julia
julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]

Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/home/ufechner/.julia/compiled/v1.10/GLMakie/jl_zBkn6i".
Failed to load plugin: '/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: hb_ot_color_has_paint'
No plugins found, falling back on no decorations
┌ Warning: GLFW couldn't create an OpenGL window.
│ This likely means, you don't have an OpenGL capable Graphic Card,
│ or you don't have an OpenGL 3.3 capable video driver installed.
│ Have a look at the troubleshooting section in the GLMakie readme:
│ https://github.com/MakieOrg/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
└ @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:250
ERROR: LoadError: GLFWError (API_UNAVAILABLE): EGL: Failed to get EGL display: Success
Stacktrace:
  [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
  [2] CreateWindow(width::Int64, height::Int64, title::String, monitor::GLFW.Monitor, share::GLFW.Window)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:499
  [3] GLFW.Window(; name::String, resolution::Tuple{Int64, Int64}, debugging::Bool, major::Int64, minor::Int64, windowhints::Vector{Tuple{UInt32, Integer}}, contexthints::Vector{Tuple{UInt32, Integer}}, visible::Bool, focus::Bool, fullscreen::Bool, monitor::Nothing, share::GLFW.Window)
    @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:344
  [4] Window
    @ ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:302 [inlined]
  [5] empty_screen(debugging::Bool; reuse::Bool)
    @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:241
  [6] empty_screen
    @ ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:222 [inlined]
  [7] singleton_screen(debugging::Bool)
    @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/screen.jl:329
  [8] macro expansion
    @ ~/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:21 [inlined]
  [9] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
 [10] macro expansion
    @ ~/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:18 [inlined]
 [11] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
 [12] top-level scope
    @ ~/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:16
 [13] include(mod::Module, _path::String)
    @ Base ./Base.jl:495
 [14] include(x::String)
    @ GLMakie ~/.julia/packages/GLMakie/ebMDx/src/GLMakie.jl:1
 [15] top-level scope
    @ ~/.julia/packages/GLMakie/ebMDx/src/GLMakie.jl:89
 [16] include
    @ ./Base.jl:495 [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::Nothing)
    @ Base ./loading.jl:2222
 [18] top-level scope
    @ stdin:3
in expression starting at /home/ufechner/.julia/packages/GLMakie/ebMDx/src/precompiles.jl:15
in expression starting at /home/ufechner/.julia/packages/GLMakie/ebMDx/src/GLMakie.jl:1
in expression starting at stdin:3
xkbcommon: ERROR: couldn't find a Compose file for locale "en_US.UTF-8" (mapped to "en_US.UTF-8")
GLFWError (PLATFORM_ERROR): Wayland: Failed to create XKB compose table
Stacktrace:
 [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
 [2] Terminate()
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:443
 [3] _atexit(exitcode::Int32)
   @ Base ./initdefs.jl:428
 [4] exit
   @ ./initdefs.jl:28 [inlined]
 [5] exec_options(opts::Base.JLOptions)
   @ Base ./client.jl:323
 [6] _start()
   @ Base ./client.jl:552

julia> 

```

Output of versioninfo():

```julia
julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)

```

Any idea?

This seams to be the relevant error:

```julia
Failed to load plugin: '/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: hb_ot_color_has_paint'

```

Installing GLMakie on this machine worked fine a few days ago. And it still works on Ubuntu 22.04, but not on Ubuntu 24.04 any more.

---

<div class="post-metadata">

**Author:** ![RayleighLord](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rayleighlord/32/33592_2.png) [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Post date:** [July 1, 2024, 12:57pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/2 "2024-07-01T12:57:03Z")

</div>

> [@ufechner7](#):
>
> ```julia
> ┌ Warning: GLFW couldn't create an OpenGL window.
> │ This likely means, you don't have an OpenGL capable Graphic Card,
> │ or you don't have an OpenGL 3.3 capable video driver installed.
> │ Have a look at the troubleshooting section in the GLMakie readme:
> │ https://github.com/MakieOrg/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
> 
> ```

I don’t know if its related, by I had a similar issue and managed to solve it with some of the solutions described [here](https://github.com/JuliaGL/GLFW.jl/issues/198). The problem was solved adding a symbolic link to the library libstdc++.so.6, but I am not sure if we are seeing the same thing here.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 1, 2024, 1:13pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/3 "2024-07-01T13:13:12Z")

</div>

Deleting `libstdc++.so` and `libstdc++.so.6` did not solve the issue.

---

<div class="post-metadata">

**Author:** ![RayleighLord](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rayleighlord/32/33592_2.png) [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)\
**Post date:** [July 1, 2024, 1:14pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/4 "2024-07-01T13:14:33Z")

</div>

But did you create a symbolic link on the folder where you deleted those files to the system libraries? I had to do that in addition of removing them to get this working.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 1, 2024, 5:11pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/5 "2024-07-01T17:11:44Z")

</div>

I think this old [issue](https://github.com/JuliaGL/GLFW.jl/issues/211) is long resolved and the old workaround does not fix my problem.

I created a simpler testcase:

```julia
julia> using GLFW
xkbcommon: ERROR: couldn't find a Compose file for locale "en_US.UTF-8" (mapped to "en_US.UTF-8")
┌ Warning: GLFW.GLFWError(GLFW.PLATFORM_ERROR, "Wayland: Failed to create XKB compose table")
└ @ GLFW ~/.julia/packages/GLFW/BWxfF/src/GLFW.jl:32

julia> GLFW.Window()
ERROR: GLFWError (API_UNAVAILABLE): EGL: Failed to get EGL display: Success
Stacktrace:
 [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
 [2] CreateWindow(width::Int64, height::Int64, title::String, monitor::GLFW.Monitor, share::GLFW.Window)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:499
 [3] GLFW.Window(; name::String, resolution::Tuple{…}, debugging::Bool, major::Int64, minor::Int64, windowhints::Vector{…}, contexthints::Vector{…}, visible::Bool, focus::Bool, fullscreen::Bool, monitor::Nothing, share::GLFW.Window)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:344
 [4] GLFW.Window()
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:302
 [5] top-level scope
   @ REPL[5]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia> 

```

Any idea?

---

<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:** [July 1, 2024, 5:23pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/6 "2024-07-01T17:23:14Z")

</div>

What happens if you downgrade `GLFW_jll` to v3.3.9 with `]add GLFW_jll@3.3.9`?

---

<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:** [July 1, 2024, 5:24pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/7 "2024-07-01T17:24:05Z")

</div>

> [@ufechner7](#):
>
> This seams to be the relevant error:
> 
> ```julia
> Failed to load plugin: '/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: hb_ot_color_has_paint'
> 
> ```

This sounds to me like you’re somehow loading some system libraries.

---

<div class="post-metadata">

**Author:** ![fatteneder](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fatteneder/32/33991_2.png) [@fatteneder](https://discourse.julialang.org/u/fatteneder)\
**Post date:** [July 1, 2024, 5:28pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/8 "2024-07-01T17:28:02Z")

</div>

I hazard a guess that GLMakie might have a dependency that depends on your system’s `libpango.so`, and another dependency that depends on `libpango.so` shipped through the artifacts. Updating your OS then might have caused an incompatibility.

At least I faced a similar problem recently with Vulkan.jl and GLFW.jl, where the former one wanted to use the system’s `libxcb.so`, whereas the latter relied on one shipped through `Xorg_libxcb_jll`.  
The solution was to upgrade `Xorg_libxcb_jll` in Yggdrasil.

---

<div class="post-metadata">

**Author:** ![JamesNZ](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jamesnz/32/35361_2.png) [@JamesNZ](https://discourse.julialang.org/u/JamesNZ)\
**Post date:** [July 1, 2024, 9:08pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/9 "2024-07-01T21:08:23Z")

</div>

FWIW I updated GLFW recently and that caused issues on OSX: [GLMakie GLFWError macOS icons · Issue #3997 · MakieOrg/Makie.jl · GitHub](https://github.com/MakieOrg/Makie.jl/issues/3997)  
So I’d also recommend downgrading to `GLFW_jll` 3.3.9 to see if that works.

About the first warning you see when `using GLFW`, here’s a relevant FAQ: [xkbcommon FAQ · davatorium/rofi Wiki · GitHub](https://github.com/davatorium/rofi/wiki/xkbcommon-FAQ#compose)  
Could you check in your `/usr/share/X11/locale` directory to see if there’s a directory in there for `en_US.UTF-8`? If it’s there then we might be building xkbcommon incorrectly in Yggdrasil, otherwise you’ll probably need to install those keyboard compose files from the Ubuntu repos (I’m not sure what they’re packaged under).

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 2, 2024, 7:32am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/10 "2024-07-02T07:32:30Z")

</div>

This fixed the issue.

For the record:

I had to add the following lines to Project.toml to make it work:

```julia
[deps]
GLFW_jll = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"

[compat]
GLFW_jll = "=3.3.9"

```

---

<div class="post-metadata">

**Author:** ![healyp](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@healyp](https://discourse.julialang.org/u/healyp)\
**Post date:** [July 2, 2024, 8:25am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/11 "2024-07-02T08:25:15Z")

</div>

Nitpicky question: did you need to make those additions by hand or did the suggestion of

> [@giordano](#):
>
> `]add GLFW_jll@3.3.9`

work as given by @giordano?

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [July 2, 2024, 8:57am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/12 "2024-07-02T08:57:30Z")

</div>

If you have the Pkg REPL, `] add GLFW_jll@3.3.9` should be sufficient. It will denote the the version in your Manifest.toml rather than configuring compat in your Project.toml.

The following should be sufficient.

```julia-repl
julia> using Pkg

julia> Pkg.add(name="GLFW_jll", version="3.3.9")

julia> Pkg.pin("GLFW_jll")

```

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [July 2, 2024, 9:08am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/13 "2024-07-02T09:08:57Z")

</div>

Well, this is not sufficient because I create a system image (the script I use to create the system image deletes any existing Manifest.toml file), and I also release my packages that depend on GLMakie and users must be able to install them without extra steps.

For example I created a new release of KiteControllers.jl with a fixed version of GLFW\_jll in [KiteControllers.jl/Project.toml at main · aenarete/KiteControllers.jl · GitHub](https://github.com/aenarete/KiteControllers.jl/blob/main/Project.toml)

---

<div class="post-metadata">

**Author:** ![Jorge\_Vieyra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jorge_vieyra/32/6527_2.png) [@Jorge\_Vieyra](https://discourse.julialang.org/u/Jorge_Vieyra)\
**Post date:** [July 6, 2024, 6:08am UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/14 "2024-07-06T06:08:37Z")

</div>

I ran into the same issue. I also pinned `GLFW_jll` to `=3.3.9`

---

<div class="post-metadata">

**Author:** ![jmert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmert/32/3161_2.png) [@jmert](https://discourse.julialang.org/u/jmert)\
**Post date:** [July 6, 2024, 6:52pm UTC](https://discourse.julialang.org/t/installing-glmakie-on-linux-fails/116468/15 "2024-07-06T18:52:02Z")

</div>

I’ve been able to track this down to the new Wayland support in GLFW v3.4, and I can avoid the issue after I modify GLFW.jl to explicitly prefer using the X11 backend on Linux.

I’ve submitted what I’ve done to workaround the issue myself as [Add new `InitHint` API and constants & use on Linux to prefer X11 by jmert · Pull Request #238 · JuliaGL/GLFW.jl · GitHub](https://github.com/JuliaGL/GLFW.jl/pull/238)
