Is there a way to update Julia from the command line? I looked through the documentation, but I couldn't find anything.
I would suggest trying asdf
if you are on MacOS, Linux, or Windows Subsystem for Linux (it does not have support for Windows proper, since it works in Linux-type shells). It's a generic tool for handling versions and has a Julia plugin. Once asdf
is installed, just do
asdf plugin add julia
to add the julia
plugin. Then it's very easy to add a new version of Julia. I don't have 1.4.0 installed on this computer (I do have 1.5.1 installed, which I will switch to later), so I will demonstrate by installing that:
$ asdf install julia 1.4.0
Downloading from:
https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.0-linux-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 94.3M 100 94.3M 0 0 5241k 0 0:00:18 0:00:18 --:--:-- 5932k
Now that it's installed, I can set it to be the default version:
$ asdf global julia 1.4.0
Then I just run julia
:
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.4.0 (2020-03-21)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
Now, if I want to change the version back to 1.5.1
, it's very easy:
$ asdf global julia 1.5.1
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.5.1 (2020-08-25)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
If you want the latest version, just do asdf install julia latest
. And to see all available versions, asdf list all julia
. Note that you seem to need to type the patch version number, e.g. asdf install julia 1.5.1
, not asdf install julia 1.5
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With