Error while using update_julia()

I’m facing issue while updating julia version. I keep getting this error. Can someone explain where exactly is issue?

ERROR: failed process: Process(`ln -sf /Applications/ /usr/local/bin/julia`, ProcessExited(1)) [1]

 [1] pipeline_error
   @ ./process.jl:565 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:480
 [3] run
   @ ./process.jl:477 [inlined]
 [4] link(executable::String, bin::String, command::String, systemwide::Bool, v::VersionNumber)
   @ UpdateJulia ~/.julia/packages/UpdateJulia/57YLT/src/UpdateJulia.jl:388
 [5] update_julia(version::String; os_str::String, arch::String, prefer_gui::Bool, fetch::Bool, _v_url::Tuple{VersionNumber, String}, v::VersionNumber, migrate_packages::Bool, url::String, aliases::Vector{String}, systemwide::Bool, install_location::String, bin::String, dry_run::Bool, verbose::Bool)
   @ UpdateJulia ~/.julia/packages/UpdateJulia/57YLT/src/UpdateJulia.jl:232
 [6] update_julia(version::String)
   @ UpdateJulia ~/.julia/packages/UpdateJulia/57YLT/src/UpdateJulia.jl:166
 [7] update_julia()
   @ UpdateJulia ~/.julia/packages/UpdateJulia/57YLT/src/UpdateJulia.jl:161
 [8] top-level scope
   @ REPL[81]:1

Which operating system are you using?

How and where did you execute update_julia() ?

im using mac OS Montery 12.3.1.

I excuted it in REPL .

julia> using UpdateJulia

julia> update_julia()

Does the command ln -sf /Applications/ /usr/local/bin/julia work?

no, it doesn’t work.

OK. Why? The command ln -sf is trying to make a symbolic link.

Does /Applications/ exist? Is /usr/local/bin/julia writable?

it exists but I’m not really sure about its writable or not but when i run ls -l /usr/local/bin I get

lrwxr-xr-x  1 root  wheel      64 Aug  3 16:46 julia -> /Applications/

and also before that error message I got this : ln: /usr/local/bin/julia: Permission denied So, i think its not writable.

Not a Mac user, but you can probably work around this by chowning the relevant directory. See e.g.

Note that the author of UpdateJulia.jl recommends juliaup as an alternative …

… as does the official Julia install guide:

juliaup seems to be more popular and well-tested across platforms.


I used this and it worked.

using UpdateJulia