# Error: no such file or directory in reference to libLLVM8.so

**URL:** <https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546>\
**Category:** Help & Support\
**Created:** [December 27, 2019, 2:15pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546 "2019-12-27T14:15:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/scott/32/948_2.png) [@scott](https://forum.crystal-lang.org/u/scott)\
**Post date:** [December 27, 2019, 2:15pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/1 "2019-12-27T14:15:39Z")

</div>

This error appears any time I try to run the `crystal` command, even `crystal --version`.

### Error follows:

```auto
crystal: error while loading shared libraries: libLLVM-8.so: cannot open shared object file: No such file or directory

```

I don’t think this is a bug, I think I have something misconfigured or broken. But I don’t know what. I have all the dependent libraries (just checked) and am running Manjaro linux on kernel 4.9.

---

<div class="post-metadata">

**Author:** ![wontruefree](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/wontruefree/32/1467_2.png) [@wontruefree](https://forum.crystal-lang.org/u/wontruefree)\
**Post date:** [December 28, 2019, 3:23pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/2 "2019-12-28T15:23:33Z")

</div>

what version of llvm do you have installed?

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/scott/32/948_2.png) [@scott](https://forum.crystal-lang.org/u/scott)\
**Post date:** [December 28, 2019, 3:24pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/3 "2019-12-28T15:24:30Z")

</div>

9.0.0-4

---

<div class="post-metadata">

**Author:** ![wontruefree](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/wontruefree/32/1467_2.png) [@wontruefree](https://forum.crystal-lang.org/u/wontruefree)\
**Post date:** [December 28, 2019, 3:26pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/4 "2019-12-28T15:26:04Z")

</div>

it looks like the crystal on your install is looking for llvm version 8 and you have version 9 on your computer. I have not seen this error and dont really know but can you install llvm-8 or reinstall crystal to try and get it to link against llvm-9

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/scott/32/948_2.png) [@scott](https://forum.crystal-lang.org/u/scott)\
**Post date:** [December 28, 2019, 3:30pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/5 "2019-12-28T15:30:48Z")

</div>

Yup, sorry for forgetting that detail in my original message. Just uninstalled and reinstalled Crystal, and the error still happens. I only have llvm 7 or 9 available on this system. Is there any way to manually instruct the compiler to link to a particular version of llvm?

oooh maybe I could symlink libLLVM-8.so to libLLVM-9.so…

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/scott/32/948_2.png) [@scott](https://forum.crystal-lang.org/u/scott)\
**Post date:** [December 28, 2019, 3:33pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/6 "2019-12-28T15:33:43Z")

</div>

Gah, figures. Symlinking didn’t work either, it’s still expecting LLVM8.

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [December 28, 2019, 4:25pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/7 "2019-12-28T16:25:54Z")

</div>

How did you install Crystal?

The official distribution package has LLVM8 statically linked. It shouldn’t require any dynamic libraries.

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/scott/32/948_2.png) [@scott](https://forum.crystal-lang.org/u/scott)\
**Post date:** [December 28, 2019, 5:12pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/8 "2019-12-28T17:12:07Z")

</div>

I had the official repo version and updated to 0.32 by downloading the package from the arch package search and installing it with `pacman -U`. I wonder if I have a weird situation where I have more than one `crystal` on my path…

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/scott/32/948_2.png) [@scott](https://forum.crystal-lang.org/u/scott)\
**Post date:** [December 28, 2019, 5:13pm UTC](https://forum.crystal-lang.org/t/error-no-such-file-or-directory-in-reference-to-libllvm8-so/1546/9 "2019-12-28T17:13:45Z")

</div>

That was my problem, there was a dynamically-linked `crystal` on the `$PATH` at a higher position than the system one. Thanks for your help guys.
