'Permission denied when I am trying to add Julia to path in MacOS
I have installed Julia 1.7 on my macOS and because I cannot call it directly from the terminal, I want to add it to the path, for this aim, I am using the following command
ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
The result is however permission denied.
Does anybody have a solution?
Cheers
Solution 1:[1]
I also installed Julia 1.7 on my macOS but could NOT call it directly from the terminal. I found /usr/local/bin that the symbolic link was pointing the julia folder:
lrwxr-xr-x 1 root wheel 52 Apr 5 17:25 julia -> /Applications/Julia-1.7.app/Contents/Resources/julia
and not to the actual julia binary file. (By the way, in the /Applications/Julia-1.7.app/Contents/Resources/julia folder, I also found an existing symbolic link julia -> /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia, but I am unsure if this was working.)
So I did this update:
% cd /usr/local/bin
% sudo rm -i julia
remove julia? y
to remove the existing link, then recreated a link to the julia file (not, as previous, the julia folder):
% sudo ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
which shows:
% ls -l
lrwxr-xr-x 1 root wheel 62 May 19 10:53 julia -> /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia
and now I CAN call Julia 1.7 on my macOS directly from my terminal, as desired:
% julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.2 (2022-02-06)
_/ |\__'_|_|_|\__'_| | HEAD/bf53498635 (fork: 461 commits, 344 days)
|__/ |
julia>
Solution 2:[2]
I would use index() with match() like so:
So, used iferror() with match() to check each column and return the position if found, if not then blank.
Then index() with max() to get the position found and return the value from column Q.
Formula in cell A15 dragged to P15 is
IFERROR(MATCH($S$2,A4:A12,0),"")
Formula in cell T2 is
INDEX(Q4:Q12,MAX(A15:P15))
Cell S2 is the value you are looking for.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DharmanBot |
| Solution 2 | Solar Mike |

