# Resolving library version incompatibility for libstdc++.so on recent Ubuntu versions

**URL:** <https://discourse.julialang.org/t/resolving-library-version-incompatibility-for-libstdc-so-on-recent-ubuntu-versions/85484>\
**Category:** Tooling\
**Tags:** question\
**Created:** [August 8, 2022, 3:27pm UTC](https://discourse.julialang.org/t/resolving-library-version-incompatibility-for-libstdc-so-on-recent-ubuntu-versions/85484 "2022-08-08T15:27:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [August 8, 2022, 3:27pm UTC](https://discourse.julialang.org/t/resolving-library-version-incompatibility-for-libstdc-so-on-recent-ubuntu-versions/85484/1 "2022-08-08T15:27:51Z")

</div>

On an x86\_64 computer running Ubuntu 22.04 (and, I think, earlier releases too) the version of `libstdc++.so` in `/usr/lib/x86_64-linux-gnu/` is `libstdc++.so.6.0.30`. Julia, even when compiled from sources, provides `./usr/lib/libstdc++.so.6.0.29`. The result is that operations like pre-compiling the `GLMakie` package fail with obscure error messages. Also certain R or Python packages that incorporate compiled C++ code fail inside of `RCall` or `PyCall`, again with error messages that may puzzle new users.

I have used two different fixes, both of which seem a bit hackish. One is brute force - changing the symbolic links in the julia sources `./usr/lib` directory for `libstdc++.so` and `libstdc++.so.6` to point to the system version, `libstdc++.so.6.0.30`, instead of the local version, `libstdc++.so.6.0.29`. An alternative, which I saw in Miguel Raz Guzmán Macedo’s JuliaCon workshop on the REPL is to call Julia as

```julia
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so julia

```

Is there a recommended way of overriding the version of `libstdc++.so` that is shipped with Julia?

---

<div class="post-metadata">

**Author:** ![palday](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palday/32/12640_2.png) [@palday](https://discourse.julialang.org/u/palday)\
**Post date:** [August 10, 2022, 3:21am UTC](https://discourse.julialang.org/t/resolving-library-version-incompatibility-for-libstdc-so-on-recent-ubuntu-versions/85484/2 "2022-08-10T03:21:45Z")

</div>

After discussing this with @ararslan, I think the Make flag to set would be `USE_SYSTEM_LIBSTDCXX`, but it doesn’t seem to exist. It might be worth a PR adding it.

---

<div class="post-metadata">

**Author:** ![palday](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palday/32/12640_2.png) [@palday](https://discourse.julialang.org/u/palday)\
**Post date:** [August 17, 2022, 4:56pm UTC](https://discourse.julialang.org/t/resolving-library-version-incompatibility-for-libstdc-so-on-recent-ubuntu-versions/85484/3 "2022-08-17T16:56:50Z")

</div>

Related: [GLIBCXX version not found](https://discourse.julialang.org/t/glibcxx-version-not-found/82209)
