# Windows artifact issue - "access denied" when installing Plots/Makie

**URL:** <https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734>\
**Category:** General Usage\
**Created:** [September 11, 2023, 9:35am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734 "2023-09-11T09:35:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 11, 2023, 9:35am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/1 "2023-09-11T09:35:47Z")

</div>

For a few days now I’ve been unable to precompile Plots and CairoMakie on my Windows machine due to “access denied” errors with artifacts. Here’s that I see:

```julia
Precompiling project...
  ✗ Cairo_jll
  ✗ HarfBuzz_jll
  ✗ libass_jll
  ✗ FFMPEG_jll
  ✗ FFMPEG
  ✗ GR_jll
  ✗ Plots
  ✗ Plots → UnitfulExt
  118 dependencies successfully precompiled in 150 seconds. 13 already precompiled.
  8 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages
  1 dependency had warnings during precompilation:
┌ GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71]
│ ERROR: LoadError: InitError: could not load library "C:\Users\ngudat\.julia\artifacts\3628616b5a5a8fd8628079ae4fb0d8948fdb37bc\bin\liblzo2-2.dll"
│ Access is denied.

```

The exact artifact sometimes changes, but all artifacts are in the same folder and many of them can be successfully used. I can precompile everything when I start Julia in an admin-elevated shell, but then I can only use the packages as an admin so that’s not really a solution.

I’ve gone into the Windows file permission menu which showed my user account as having read access to the files, and I’ve also given myself full permissions on the relevant dlls to no avail.

Has anyone come across this?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [September 11, 2023, 11:23am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/2 "2023-09-11T11:23:42Z")

</div>

[I’ve seen](https://github.com/JuliaLang/julia/issues/38993) this error in the past with libraries that weren’t marked as executables, but that isn’t the case for [LZO\_jll v2.10.1+0](https://github.com/JuliaBinaryWrappers/LZO_jll.jl/releases/download/LZO-v2.10.1%2B0/LZO.v2.10.1.x86_64-w64-mingw32.tar.gz), so I don’t think that’s the problem here (also because you said this happens with various artifacts, so the problems seems widespread). But somehow julia can’t load the downloaded library.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 12, 2023, 8:15am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/3 "2023-09-12T08:15:53Z")

</div>

…and just like that the problem disappeared. I gave myself full access to the file (which worked without admin rights as the artifacts are in my user folder anyway), restarted the computer and precompilation went through. Somewhat unsatisfactory solution but at least I can plot again!

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 22, 2023, 9:52am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/4 "2023-09-22T09:52:00Z")

</div>

Another update, the same issue - this time it was OpenSSL, which initially complained about `libcrypto-3-x64.dll` and then `libssl-3-x64.dll`. The way I solved it this time was to give `EVERYONE` full permissions to the files, then reboot. Sometimes the permissions didn’t stick though so I had to re-assign them after booting, but the key was to do it before trying to precompile - if I tried precompiling prior to changing permissions, precompiling afterwards with new permissions would still fail.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [September 22, 2023, 3:29pm UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/5 "2023-09-22T15:29:59Z")

</div>

What version of Julia are you using? CC: @visr

---

<div class="post-metadata">

**Author:** ![visr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/visr/32/17204_2.png) [@visr](https://discourse.julialang.org/u/visr)\
**Post date:** [September 22, 2023, 5:45pm UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/6 "2023-09-22T17:45:05Z")

</div>

Since I started using 1.10.0-beta2 as my daily driver I sporadically run into the same issue, but nothing I can reproduce. If I delete the read-only artifact and add it again, it works.

For instance, this just happened randomly with LibPQ\_jll: [[GDAL] fix version\_offset by visr · Pull Request #7412 · JuliaPackaging/Yggdrasil (github.com)](https://github.com/JuliaPackaging/Yggdrasil/pull/7412#issuecomment-1731607607), where all files in the artifact were suddenly `mode: 0o100444 (-r--r--r--)` instead of `mode: 0o100666 (-rw-rw-rw-)`.

```julia
julia> versioninfo()
Julia Version 1.10.0-beta2
Commit a468aa198d (2023-08-17 06:27 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 24 × 12th Gen Intel(R) Core(TM) i7-12800HX
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, alderlake)
  Threads: 23 on 24 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 16
  JULIA_PKG_PRESERVE_TIERED_INSTALLED = true
  JULIA_PKG_SERVER = juliahub.com
  JULIA_PKG_USE_CLI_GIT = true
  JULIA_PROJECT = @.

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 23, 2023, 12:40am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/7 "2023-09-23T00:40:49Z")

</div>

I was using 1.10beta2 when this issue first appeared. I then tried to isolate it to that version but interestingly after I saw the error on 1.10beta2 it also popped up on 1.9.3.

---

<div class="post-metadata">

**Author:** ![visr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/visr/32/17204_2.png) [@visr](https://discourse.julialang.org/u/visr)\
**Post date:** [September 23, 2023, 6:04am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/8 "2023-09-23T06:04:46Z")

</div>

Do you mean 1.9.3 installed an artifact with read-only permissions? Or was it just that it errored on trying to use a read-only artifact that 1.10.0-beta2 put there? Because the latter I see as well, but that doesn’t mean 1.9.3 has this issue.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [September 23, 2023, 6:18am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/9 "2023-09-23T06:18:44Z")

</div>

Would you mind to open an issue in Julia? It sounds like there’s a problem with installation of artifacts in v1.10, although the fact that it can’t be consistently reproduced is annoying.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 23, 2023, 6:41am UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/10 "2023-09-23T06:41:34Z")

</div>

I’m not sure to be honest, but I assume it is the second, ie precompilation failed in 1.9.3 because it was trying to use the artifact that 1.10beta2 installed.

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [October 3, 2024, 7:18pm UTC](https://discourse.julialang.org/t/windows-artifact-issue-access-denied-when-installing-plots-makie/103734/11 "2024-10-03T19:18:19Z")

</div>

I think I just met an occurrence of this problem with

> PkgPrecompileError: The following 1 direct dependency failed to precompile:
> 
> Mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e]
> 
> Failed to precompile Mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e] to “\.julia\compiled\v1.10\Mousetrap\jl\_92F8.tmp”.  
> ERROR: LoadError: InitError: could not load library “.julia\artifacts\0875e2f510cced16080eb4a506fbaec57d0893e7\bin\libtiff-6.dll”  
> Access is denied.

I’ll try to see if something changes that, restarted the computer changed nothing, only manually deleting the artifact made it work.
