# How to get libLLVM-9.0.1.so on Ubuntu 18.04 required by Cxx package?

**URL:** <https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950>\
**Category:** New to Julia\
**Tags:** cxx\
**Created:** [June 7, 2020, 9:02pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950 "2020-06-07T21:02:33Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 7, 2020, 9:02pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/1 "2020-06-07T21:02:33Z")

</div>

With Julia 1.5.0-beta1 on Ubuntu 18.04.4 I’m getting:

```julia
(@v1.5) pkg> build Cxx
   Building Cxx → `~/.julia/packages/Cxx/1RaOv/deps/build.log`
┌ Error: Error building `Cxx`: 
│ ERROR: LoadError: could not load library "libLLVM-9.0.1"
│ libLLVM-9.0.1.so: cannot open shared object file: No such file or directory

```

Ubuntu 18.04 package manager doesn’t provide libLLVM-9.0.1, libLLVM-9 is the newest available. What is the solution?

---

<div class="post-metadata">

**Author:** ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)\
**Post date:** [June 8, 2020, 5:03am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/2 "2020-06-08T05:03:54Z")

</div>

I’m not sure if this helps, but did you try to install them by

```julia
sudo apt install llvm-9 llvm-9-dev

```

?  
They should be available according to: [Ubuntu – Details of package llvm-9-dev in bionic](https://packages.ubuntu.com/bionic/llvm-9-dev) but maybe you still need to wait for: [WIP: Fix source build for Julia 1.5 by Gnimuc · Pull Request #466 · JuliaInterop/Cxx.jl · GitHub](https://github.com/JuliaInterop/Cxx.jl/pull/466)

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 8, 2020, 6:02pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/3 "2020-06-08T18:02:52Z")

</div>

I have `libLLVM-9.so` installed, but Cxx requires `libLLVM-9.0.1.so`.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 10, 2020, 8:11am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/4 "2020-06-10T08:11:33Z")

</div>

Should I just abandon Ubuntu and install Manjaro, which has llvm toolchain 9.0.1 available? 😉

BTW, I have the same problem with Julia 1.4.2, which requires libLLVM-8.0.1.so for Cxx package. Unobtanium for Ubuntu 18.04.4.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 10, 2020, 8:39am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/5 "2020-06-10T08:39:12Z")

</div>

> [@pauljurczak](#):
>
> Should I just abandon Ubuntu and install Manjaro, which has llvm toolchain 9.0.1 available?

Or just upgrade to Ubuntu 20.04 LTS, which has LLVM up to version 10?

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 10, 2020, 8:42am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/6 "2020-06-10T08:42:15Z")

</div>

I noticed that. Unfortunately, I’m tied up to ROS Melodic, which is not available for Ubuntu 20.04. Constraint satisfaction failed! 😒

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 10, 2020, 8:47am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/7 "2020-06-10T08:47:32Z")

</div>

I am not a user of ROS, but if I understand correctly you can just compile whatever version you need from sources:

[https://wiki.ros.org/melodic/Installation/Source](https://wiki.ros.org/melodic/Installation/Source)

so you may get Melodic working on 20.04. YMMV.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 10, 2020, 8:55am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/8 "2020-06-10T08:55:54Z")

</div>

Theoretically yes, but it is huge collection of modules and I’ve heard many horror stories about building ROS from source gone wrong. I also have other dependencies. I’m trying to find an easy way before I do something more dramatic. I’m tempted to give Manjaro a try. Ubuntu restrictions on available package versions are pretty annoying.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 14, 2020, 10:22pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/9 "2020-06-14T22:22:15Z")

</div>

I’m having the same problem with Julia docker image:

```julia
paul@desktop:~$ docker run -it --rm julia
(@v1.4) pkg> add Cxx
.....
   Building Cxx → `~/.julia/packages/Cxx/1RaOv/deps/build.log`
┌ Error: Error building `Cxx`: 
│ ERROR: LoadError: could not load library "libLLVM-8.0.1"

```

Any suggestions for this environment?

---

<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:** [June 14, 2020, 11:42pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/10 "2020-06-14T23:42:19Z")

</div>

I believe there is something wrong in `Cxx.jl`, you shouldn’t install libLLVM, it comes bundled with Julia. @Gnimuc

---

<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:** [June 14, 2020, 11:48pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/11 "2020-06-14T23:48:04Z")

</div>

Ok, `Cxx.jl` only works for Julia up to v1.3: [https://github.com/JuliaInterop/Cxx.jl/issues/464](https://github.com/JuliaInterop/Cxx.jl/issues/464)

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 16, 2020, 5:03pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/12 "2020-06-16T17:03:14Z")

</div>

Out of curiosity I tried `julia:1.0` docker image and no cigar either:

```julia
paul@desktop:~$ docker run -it --rm julia:1.0
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.5 (2019-09-09)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(v1.0) pkg> add Cxx
   Cloning default registries into /root/.julia/registries
   Cloning registry General from "https://github.com/JuliaRegistries/General.git"
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Cxx [a0b5b9ef]:
 Cxx [a0b5b9ef] log:
 ├─possible versions are: [0.3.0-0.3.4, 0.4.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.3.0-0.3.4, 0.4.0]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

```

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [June 16, 2020, 5:30pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/13 "2020-06-16T17:30:39Z")

</div>

There was never any version of Cxx that supported Julia 1.0. You would have better chances with 1.1-1.3.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [June 16, 2020, 5:47pm UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/14 "2020-06-16T17:47:47Z")

</div>

I was looking for version 1.3, but official Julia docker images give me only 1.0.5 or 1.4.2 options and nothing in between.

---

<div class="post-metadata">

**Author:** ![AdamR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamr/32/5109_2.png) [@AdamR](https://discourse.julialang.org/u/AdamR)\
**Post date:** [September 29, 2020, 9:02am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/15 "2020-09-29T09:02:46Z")

</div>

I just did that. The same problem on Ubuntu 20.04.1, unfortunately. Installing `llvm-9` and `llvm-9-dev` does not help. What kind of Linux is actually compatible with Cxx? Is the difference between LLVM 9.0 and 9.0.1 so ground-breaking to justify incompatibility with the most popular Linux distribution?

---

<div class="post-metadata">

**Author:** ![Gnimuc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gnimuc/32/2194_2.png) [@Gnimuc](https://discourse.julialang.org/u/Gnimuc)\
**Post date:** [September 29, 2020, 9:42am UTC](https://discourse.julialang.org/t/how-to-get-libllvm-9-0-1-so-on-ubuntu-18-04-required-by-cxx-package/40950/16 "2020-09-29T09:42:09Z")

</div>

> [@AdamR](#):
>
> What kind of Linux is actually compatible with Cxx? Is the difference between LLVM 9.0 and 9.0.1 so ground-breaking to justify incompatibility with the most popular Linux distribution?

The problem is actually Julia’s version. `Cxx.jl` only works for Julia up to v1.3, at least for now. I tried to make it work on [v1.4](https://github.com/JuliaInterop/Cxx.jl/pull/465)/[v1.5](https://github.com/JuliaInterop/Cxx.jl/pull/466) but failed.
