I’m on Windows, but experimenting with running Julia (and jupyter / IJulia) from WSL2 (windows subsystem for linux), in the hopes of speeding up startup latency times.[1]
On my personal machines, I just untar into a directory within my home directory and then make symbolic links to the julia executable, e.g.
cd ~/packages
tar xvfpz julia-1.8.5-linux-x86_64.tar.gz
cd ~/bin
rm julia
ln -s ~/packages/julia-1.8.5/bin/julia julia-1.8.5
ln -s julia-1.8.5 julia
I have ~/bin in my PATH so that executing julia from the command line starts the most recent julia version, and prior versions are still accessible by calling, say, julia-1.8.3.
Doing this without root privileges is easier and safer.
I use Gnu Stow. I extract the julia tar file in /usr/local/stow and then stow creates the necessary symlinks to install everything. Installing in /usr/local does require root access, if you don’t have that you could use a subdirectory of $HOME for your stow and target directories.
curl https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.4-linux-x86_64.tar.gz -o - \
| sudo tar -C /usr/local/stow -xzf-
# remove the symlinks to the previous version
sudo stow -Dd /usr/local/stow julia-1.8.3
# Install the new symlinks
sudo stow -d /usr/local/stow julia-1.8.4
I’m currently root, as it’s a VM anyway so I’m not afraid of bricking something; and I remember lots of software being hard to install if you weren’t root.
Have you ever been saved by not having root privileges?
Why not use Docker and simply spin up a container from my JupyterLab Julia docker stack.
→ Multi-arch (linux/amd64 , linux/arm64/v8 ) docker images based on Debian including Julia, JupyterHub, JupyterLab, code-server (aka VS Code), Git, Git LFS, Pandoc, Zsh plus several popular VS Code extensions.
These images have Julia installed at /opt/julia. For Julia versions 1.9 and later, Julia will be installed at /usr/local/julia.
with respect to Julia, no, but in general yes, many times. My root prompt is root# in bright red, and it reminds me to be extra careful about moving and removing things. And Julia works just fine when installed not as root.