# "julia: error while loading shared libraries: libjulia.so.1: cannot open shared object file: No such file or directory" error when starting julia from command line on ubuntu

**URL:** <https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707>\
**Category:** General Usage\
**Tags:** repl, linux, installation, ubuntu\
**Created:** [December 7, 2021, 11:16am UTC](https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707 "2021-12-07T11:16:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [December 7, 2021, 11:16am UTC](https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707/1 "2021-12-07T11:16:24Z")

</div>

On ubuntu 18.04

I have a desktop which I haven’t really used since pre-pandemic times (with julia 1.3.1). I can run julia 1.3.1 from it just fine. However, I want to run the latest version (1.7.0)! I have downloaded that, and put the new folder within my home folder, and added it to my PATH. However, I I try starting it from the terminal using “julia” I get an error:

```julia
julia: error while loading shared libraries: libjulia.so.1: cannot open shared object file: No such file or directory

```

I even navigate to the specific folder where the julia bin file is, and try from there, and I get this response. I also get this response if I try the julia 1.6.4 version (but 1.3.1 works fine). I have added this bin file (1.7.0/bin/julia) to atom, and I can start julia 1.7.0 from within atom without problem. Same with running Jupyter notebooks with version 1.7.0. But not from within the terminal. I have no idea what this means.

I tried some googling. These:

> [@Cannot start Julia 1.4.2](https://discourse.julialang.org/t/cannot-start-julia-1-4-2/41267/6):
>
> Then there’s your problem: your julia binary was compiled in a system with that library, but it’s not present in your system. If you installed julia via Fedora’s packaging system, and the problem remains after a full system update, then the problem is with Fedora’s julia package.

> **[Unable to start julia (libjulia.so not found). : Forums : PythonAnywhere](https://www.pythonanywhere.com/forums/topic/2145/)**
>
> Forums : PythonAnywhere

make it seem that julia isn’t supported. I have never encountered this before. Surely it can’t be that _no one_ is currently able to run julia 1.6.4 and 1.7.0 from an ubuntu machine (I have ubuntu 18.04)!?

I also looked at

> **[\[Solved\] cannot open shared object file Error in Ubuntu](https://itsfoss.com/solve-open-shared-object-file-quick-tip/)**
>
> Complete detailed solution for fixing “error while loading shared libraries” error in Ubuntu-based Linux distributions.

and did try running

```julia
sudo /sbin/ldconfig -v

```

but unfortunately, that didn’t work. Now I am uncertain what to do.

---

<div class="post-metadata">

**Author:** ![learned\_fool](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/learned_fool/32/21934_2.png) [@learned\_fool](https://discourse.julialang.org/u/learned_fool)\
**Post date:** [January 23, 2022, 5:39pm UTC](https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707/2 "2022-01-23T17:39:07Z")

</div>

Hi,  
I’m facing this too. were you able to find a solution/ could someone else post a solution here?  
Thanks

---

<div class="post-metadata">

**Author:** ![Dimitri\_WALTHER](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dimitri_walther/32/37054_2.png) [@Dimitri\_WALTHER](https://discourse.julialang.org/u/Dimitri_WALTHER)\
**Post date:** [June 10, 2022, 8:35am UTC](https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707/3 "2022-06-10T08:35:54Z")

</div>

Hi,  
In case you haven’t solved the problem yet, here is what I have done do solve the issue.

I’m guessing the problem comes from the computer not knowing where to find the library. You can avoid that problem by defining the LD\_LIBRARY\_PATH variable locally when launching the julia REPL.

```julia
LD_LIBRARY_PATH=path_to_your_libraries_directory julia

```

you can now run your programs in the julia REPL or simply call your program right after “julia” in the code above.

I hope it will solve your issue as it solved mine,

Have a great day !

---

<div class="post-metadata">

**Author:** ![dgs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dgs/32/7015_2.png) [@dgs](https://discourse.julialang.org/u/dgs)\
**Post date:** [May 11, 2023, 6:20am UTC](https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707/4 "2023-05-11T06:20:57Z")

</div>

Had this issue today installing version 1.9.0.

In case it is of any use to anyone or even future-me, I recommend the use of juliaup [GitHub - JuliaLang/juliaup: Julia installer and version multiplexer](https://github.com/JuliaLang/juliaup)

On linux, the installation is faster than writing this post :

```julia
curl -fsSL https://install.julialang.org | sh

```

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [May 11, 2023, 8:06pm UTC](https://discourse.julialang.org/t/julia-error-while-loading-shared-libraries-libjulia-so-1-cannot-open-shared-object-file-no-such-file-or-directory-error-when-starting-julia-from-command-line-on-ubuntu/72707/5 "2023-05-11T20:06:27Z")

</div>

Agreed on juliaup. Uses it now and it is good.
