asdf-julia
asdf-julia copied to clipboard
Julia not installing properly anymore
Hi,
I'm suddenly having a problem when trying to install Julia versions using Asdf. Here are the steps I follow to install for instance Julia 1.7.1:
$ asdf install julia 1.7.1
Then I do:
$ asdf global julia 1.7.1
But when I try to run the Julia REPL, I get the following:
$ julia
No preset version installed for command julia
Please install a version by running one of the following:
asdf install julia 1.7.1
or add one of the following versions in your config file at /home/christophe/.tool-versions
julia 1.4.2
julia 1.5.0
julia 1.5.1
julia 1.5.2
julia 1.5.3
julia 1.5.4
julia 1.6.0
julia 1.6.1
julia 1.6.2
julia 1.6.3
julia 1.6.4
julia 1.7.0
Yet asdf list julia
correctly lists 1.7.1:
$ asdf list julia
1.4.2
1.5.0
1.5.1
1.5.2
1.5.3
1.5.4
1.6.0
1.6.1
1.6.2
1.6.3
1.6.4
1.7.0
1.7.1
So I don't understand what's going on. Can you see if you can reproduce the issue? I'm on Ubuntu 18.04.
Do any of the other versions still work for you?
If you mean "can I install other Julia versions"? No. I used 1.7.1 as example, but I can't install any version of Julia at the moment, they all have the same problem (I've tried 1.3.0 and 1.6.5). Versions that were already installed work fine though.
By the way, I noticed two additional things: when I try to install a Julia version, I now get a list of installed files that shows up on the terminal after the downloading completes. Like this:
$ asdf install julia 1.6.5
Downloading from:
https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.5-linux-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 108M 100 108M 0 0 2719k 0 0:00:40 0:00:40 --:--:-- 2119k
x julia-1.6.5/
x julia-1.6.5/LICENSE.md
x julia-1.6.5/lib/
x julia-1.6.5/lib/libjulia.so.1.6
x julia-1.6.5/lib/julia/
x julia-1.6.5/lib/julia/libgit2.so
x julia-1.6.5/lib/julia/libcamd.so.2
x julia-1.6.5/lib/julia/libgomp.so.1
x julia-1.6.5/lib/julia/libgmp.so
x julia-1.6.5/lib/julia/libgit2.so.1.1.0
x julia-1.6.5/lib/julia/libamd.so
x julia-1.6.5/lib/julia/libpcre2-8.so.0
x julia-1.6.5/lib/julia/libumfpack.so
x julia-1.6.5/lib/julia/libgmp.so.10.4.0
x julia-1.6.5/lib/julia/libatomic.so.1
x julia-1.6.5/lib/julia/libmpfr.so
x julia-1.6.5/lib/julia/libnghttp2.so
x julia-1.6.5/lib/julia/libsuitesparseconfig.so.5.4.0
x julia-1.6.5/lib/julia/libsuitesparseconfig.so.5
x julia-1.6.5/lib/julia/libcamd.so.2.4.6
x julia-1.6.5/lib/julia/libmbedx509.so
x julia-1.6.5/lib/julia/libcolamd.so.2
x julia-1.6.5/lib/julia/libssh2.so.1
x julia-1.6.5/lib/julia/libz.so.1
...
It never did that before.
Also, I checked what's happening in the .asdf
folder, and there's something weird going on in .asdf/installs/julia
. Here's what the folder of a correctly installed Julia version looks like:
1.7.0/
bin/
etc/
include/
lib/
libexec/
share/
LICENSE.md
But when I installed 1.6.5 as I did above, here's what the .asdf/installs/julia/1.6.5
folder ended up looking like:
1.6.5/
julia-1.6.5/
bin/
etc/
include/
lib/
libexec/
share/
LICENSE.md
julia.archive
As you can see, there's an extra julia-1.6.5
folder in there, as well as a julia.archive
file which is just not there in the other installs. Could that explain what's going on?
Okay, thank you for the clarification. The directory layout is certainly wrong which causes asdf to be unable to find the binary. If you moved the content of julia-1.6.5
up in to the root of 1.6.5
then it would probably work. Though that is of course only a hot fix and one would have to figure out why that happens for you. Can you report which asdf
version you are on by running asdf --version
? I am on asdf v0.8.1 and there I cannot reproduce the issue but I just saw that 0.9 was released at the end of last year so maybe that has introduced some breaking changes that require an update of the plugin.
I tried moving the contents of julia-1.6.5
to 1.6.5
, but it didn't work. I still got the same "No preset version..." error afterwards. So it seems that just moving folders around isn't enough (maybe the version needs to be "registered" in some way? A bit like a pyenv rehash
? Sorry, I don't know enough about the internals of asdf
here).
As for the asdf
version, I get this:
$ asdf --version
v0.9.0-9ee24a3
I did update asdf
this morning before trying to install Julia 1.7.1, so that's probably the issue indeed.
I just installed Julia 1.7.1 with asdf
0.9 and could not reproduce this issue. Is it still a problem for you, @tsela ?
@lassepe Yes it is. Just tried, and it still installs incorrectly.
@lassepe Just wanted to let you know that something strange is going on. I have two computers where I use asdf
to install Julia. One is running Ubuntu 20.04, the other Ubuntu 18.04. I was having the issue above on both. Now I only have the issue on the computer running 18.04. On the 20.04 computer, asdf
installs Julia correctly again. I keep both asdf
updated using asdf update
so there shouldn't be a difference between the two, but there we are.
Also, I finally found a working workaround. As you mentioned in your Jan 11 comment:
If you moved the content of
julia-1.6.5
up in to the root of1.6.5
then it would probably work.
Well, it doesn't work directly, but if I move the contents and then run asdf reshim julia <version>
, I can get it to work. So I can add new versions of Julia again, although the workaround is annoying.
But it's weird that on one computer asdf
is working again normally, while on the other it keeps behaving abnormally. Let me print here the contents of asdf info
for both computers so we can compare and check if there's any difference besides the Ubuntu version.
asdf info
on the 18.04 computer:
OS:
Linux Ubuntu-VirtualBox 5.4.0-99-generic #112~18.04.1-Ubuntu SMP Thu Feb 3 14:09:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
SHELL:
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ASDF VERSION:
v0.9.0-9ee24a3
ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/home/christophe/.asdf
ASDF INSTALLED PLUGINS:
julia https://github.com/rkyleg/asdf-julia.git master 1788f0f
I'll print asdf info
on my other computer as soon as I get the chance to boot it up.