"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

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: 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:

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

and did try running

sudo /sbin/ldconfig -v

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

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

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.

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 !

1 Like

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

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

curl -fsSL https://install.julialang.org | sh
1 Like

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