Currently, the Julia programming language version that is available in the APT package management interface is 1.4.1, which was released by Julia on 2020-04-14. Recently I decided to just get the latest and greatest stable version that was released 2020-11-09. In going through the process, I thought it would be helpful to document it for others.
Originally I had installed Julia from APT using:
sudo apt install julia
This is great and easy way to get up and running quickly. APT will manage the updates when their repos are updated. Since Julia is still a relatively young language, I think it would be important to keep more up to date on the language’s stable release base, as well as packages. I’m not quite the bleeding edge type so I don’t need to get the latest beta version or worry about the nightly builds at this point.
You can always reference their release notes to see if the latest version fixes any problems you are currently having with your current installed version. For information on their latest development version, reference their NEWS page.
Manual Upgrading
First thing you should do is to navigate to the Julia downloads page.
You can either click a link to start the download or use the wget
command then copy the link address and paste((ctrl+alt+v) in your terminal.
wget https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.3-linux-x86_64.tar.gz
Download Verification
GPG
Using the wget
command again we can get the keys and the GPG file associated with the download version/architecture.
wget https://julialang.org/assets/juliareleases.asc
wget https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.3-linux-x86_64.tar.gz.asc
Once downloaded we can run the following command to import the public key using the gpg
utility.
gpg --import juliareleases.asc
Now we can verify the tarball and its GPG signature with the gpg
utility.
gpg --verify julia-1.5.3-linux-x86_64.tar.gz.asc julia-1.5.3-linux-x86_64.tar.gz
We get the response of:
gpg: Good signature from "Julia (Binary signing key) [email protected]" [unknown]
Install the Application
Now that we have verified the file, we can unpack the tarball/source and install. The tar
command is an archiving utility. The option arguments xvzf
are:
- x = extract. Extracts the contents of the archive referenced (required)
- v = verbose. Lists the files processed (optional)
- z = gzip. Filters the archive through gzip (.gz) (archive specific)
- f = file. Used just before referencing the archive to process. (required)
tar xvzf ~/Downloads/julia-1.5.3-linux-x86_64.tar.gz
Next, I’ll move (mv
) the unpacked directory from my ~/Downloads/
directory to my /opt
directory. The /opt
directory is a place to install add-on application software packages. I will also create a symbolic link to a julia
file in my /usr/local/bin/
directory.
sudo mv ~/Downloads/julia-1.5.3/ /opt/
sudo ln -s /opt/julia-1.5.3/bin/julia /usr/local/bin/julia
Removing APT Install
At this point I can remove my previously APT installed version of Julia. To remove the APT version of Julia installed previously I can run the following command. This will cleanly remove the older version and its unneeded dependencies.
sudo apt autoremove julia
Run Julia
From the terminal, run the following. If you got something different from what you installed, something went wrong and you need to troubleshoot the issue.
julia