I am running Ubuntu 18.04.3 LTS. I guess my question is a general question about symbolic links with a specific set up. However, I am new to Ubuntu and maybe I am wrong and my issue lies somewhere else.

I want to set up a way of just typing julia or something similar in the command line and getting Julia 1.3.1 (from Installation 2) running.

I have recently installed Julia programming language in two different ways:

  • [Installation 1] Using sudo apt install julia
  • [Installation 2] Using the official generic binaries

I have followed the instructions in this link: https://julialang.org/downloads/platform.html

So far, when I run julia in the command line, I get Installation 1 going (which is version 1.0.4 of Julia Lang). However, I would like the command julia (or julia131, the syntax is not the main point here for me) to start Installation 2, which is Julia 1.3.1. I have explored some of the suggestions available in the link above.

  • So far, I have only managed to run Julia 1.3.1 using /home/<me>/julia-1.3.1/bin/julia
  • I have tried creating a symbolic link using the following command sudo ln -s home/<me>/julia-1.3.1/bin/julia /usr/bin/julia (I have also tried sudo ln -s home/<me>/julia-1.3.1/bin/julia /usr/bin/julia131). I have inspected my /usr/bin/directory and I can actually see the archives julia and julia131 there. However, when I try to run them, from /usr/bin, neither of them work.
  • I have tried adding export PATH="$PATH:/path/to/home/<me>/julia-1.3.1/bin" and export PATH="$PATH:/home/<me>/julia-1.3.1/bin" (I was not sure which syntax was the correct one) as suggested in the link. It also did not work, but I am not fully confident that I am doing it right.
  • I have added PATH=$PATH:/home/roberto/julia-1.3.1/bin/ to .profile. Not sure how this would work, but I have read it somewhere in the internet. In any case, it did not work for me.

Do you have any suggestions on how I can solve this issue? Thanks in advance for your help!

  • 1
    If you want julia-1.3.1 to be found first, its location needs to go ahead of other locations in your path i.e. PATH="/home/<me>/julia-1.3.1/bin:$PATH" – steeldriver Jan 8 '20 at 20:18
  • Thanks @steeldriver! That has worked! Should I worry that this line in my ./bashrc will create any problems for other applications or commands? Also, once I have a line like this in my ./bashrc can I add another one for another program I have? – Roberto Amaral Santos Jan 8 '20 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.