# Error when updating Julia via UpdateJulia

**URL:** <https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046>\
**Category:** New to Julia\
**Created:** [November 30, 2022, 12:25pm UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046 "2022-11-30T12:25:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![phantom](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@phantom](https://discourse.julialang.org/u/phantom)\
**Post date:** [November 30, 2022, 12:25pm UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/1 "2022-11-30T12:25:02Z")

</div>

I am currently using Julia version 1.7.2. on macOS Monterey with an arm processor, When I tried updating to 1.8.3 via the UpdateJulia package I received the following permission error

```julia
/dev/disk4 GUID_partition_scheme          
/dev/disk4s1 EFI                            
/dev/disk4s2 Apple_HFS /Volumes/Julia-1.8.3
"disk4" ejected.
ln: /usr/local/bin/julia: Permission denied
ERROR: failed process: Process(`ln -sf /Applications/Julia-1.8.3.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:531 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:446
 [3] run
   @ ./process.jl:444 [inlined]
 [4] link(executable::String, bin::String, command::String, systemwide::Bool, v::VersionNumber)
   @ UpdateJulia ~/.julia/packages/UpdateJulia/TwtsF/src/UpdateJulia.jl:374
 [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/TwtsF/src/UpdateJulia.jl:221
 [6] update_julia(version::String)
   @ UpdateJulia ~/.julia/packages/UpdateJulia/TwtsF/src/UpdateJulia.jl:158
 [7] update_julia()
   @ UpdateJulia ~/.julia/packages/UpdateJulia/TwtsF/src/UpdateJulia.jl:169
 [8] top-level scope
   @ REPL[9]:1

```

Just wondering if there was a quick fix to this and if it is recommended to update to 1.8 from 1.7? Any tips would be appreciated thanks!

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [December 2, 2022, 5:43am UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/2 "2022-12-02T05:43:12Z")

</div>

You might be able to do

```julia
update_julia(; systemwide=false)

```

---

<div class="post-metadata">

**Author:** ![phantom](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@phantom](https://discourse.julialang.org/u/phantom)\
**Post date:** [December 2, 2022, 6:52am UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/3 "2022-12-02T06:52:41Z")

</div>

Thanks so much! I think this installed 1.8 as It is says that packages have been migrated from 1.7 to 1.8. However when I restart Julia and check version I am still getting

```julia
VERSION
v"1.7.2"

```

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [December 2, 2022, 7:24am UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/4 "2022-12-02T07:24:35Z")

</div>

How do you launch julia?

---

<div class="post-metadata">

**Author:** ![phantom](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@phantom](https://discourse.julialang.org/u/phantom)\
**Post date:** [December 2, 2022, 7:53am UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/5 "2022-12-02T07:53:19Z")

</div>

I launched it through VScode?

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [December 2, 2022, 8:41am UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/6 "2022-12-02T08:41:04Z")

</div>

> [@Error \`julia.environmentPath\` on Linux](https://discourse.julialang.org/t/error-julia-environmentpath-on-linux/87878/4):
>
> I would try opening VS Code Settings → Extensions → Julia, and under “Julia: Executable Path”, manually adding the path to julia, e.g. the result of whereis julia in the terminal.

---

<div class="post-metadata">

**Author:** ![phantom](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@phantom](https://discourse.julialang.org/u/phantom)\
**Post date:** [December 2, 2022, 11:44am UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/7 "2022-12-02T11:44:28Z")

</div>

thanks for helping with this! so when I ran `update_julia(; systemwide=false)` it said

```julia
Please add /Users/kat/.local/bin to path

```

but when I added it to Julia:Executable Path I keep getting a system error in Julia. So I tried to check if I had the right path, but when I typed `whereis Julia` into terminal it just returns :`Julia` . I tried updating VScode but that didn’t seem to do anything.

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [December 2, 2022, 12:01pm UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/8 "2022-12-02T12:01:15Z")

</div>

> [@phantom](#):
>
> `/Users/kat/.local/bin`

Try making Julia: Executable Path

```julia
/Users/kat/.local/bin/julia

```

---

<div class="post-metadata">

**Author:** ![phantom](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@phantom](https://discourse.julialang.org/u/phantom)\
**Post date:** [December 2, 2022, 1:06pm UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/9 "2022-12-02T13:06:13Z")

</div>

Wow that did it! thanks so much it would’ve taken me days without your help!

This is a sum up of all of @jd-foster’s answers for future reference and any other less savvy novices since I asked so many questions to get it working.

to update Julia within the REPL try

```julia
]add UpdateJulia
using UpdateJulia
update_julia()

```

if this does not work try

```julia
update_julia(; systemwide=false)

```

UpdateJulia will then display the following message:

`Please add /Users/user/.local/bin to path`

In VSCode:

1. Click on Extensions on the left hand side
2. Select or type in Julia.
3. Click on the gear icon
4. Select Extension Settings
5. Under Julia: Executable Path - paste the path provided by UpdateJulia + /julia so

```julia
/Users/user/.local/bin/julia

```

You can check if the updated version is installed by typing `VERSION` into the REPL and update packages with  
` ]up`

---

<div class="post-metadata">

**Author:** ![phantom](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@phantom](https://discourse.julialang.org/u/phantom)\
**Post date:** [May 3, 2024, 9:01pm UTC](https://discourse.julialang.org/t/error-when-updating-julia-via-updatejulia/91046/10 "2024-05-03T21:01:02Z")

</div>

For future reference `UpdateJulia` is now deprecated and unmaintained - Update with [juliaup](https://github.com/JuliaLang/juliaup) instead as noted by [ufechner7](https://discourse.julialang.org/u/ufechner7) [here](https://discourse.julialang.org/t/error-updating-julia-to-1-10-3-with-updatejulia-on-mac/113703)
