Can't add HDF5.jl on Windows 10 with Julia 1.0.0

Hello,

I was trying to add the HDF5.jl package on my computer. From the package manager I write add HDF5 command and get the following screen containing the error message:

(v1.0) pkg> add HDF5
  Updating registry at `C:\Users\adurmus\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed Blosc ──────── v0.5.1
 Installed CMake ──────── v1.1.1
 Installed CMakeWrapper ─ v0.2.2
 Installed HDF5 ───────── v0.10.3
 Installed StatsBase ──── v0.27.0
  Updating `C:\Users\adurmus\.julia\environments\v1.0\Project.toml`
  [f67ccb44] + HDF5 v0.10.3
  [2913bbd2] ↑ StatsBase v0.26.0 ⇒ v0.27.0
  Updating `C:\Users\adurmus\.julia\environments\v1.0\Manifest.toml`
  [a74b3585] + Blosc v0.5.1
  [631607c0] + CMake v1.1.1
  [d5fb7624] + CMakeWrapper v0.2.2
  [f67ccb44] + HDF5 v0.10.3
  [2913bbd2] ↑ StatsBase v0.26.0 ⇒ v0.27.0
  [8bf52ea8] + CRC32c
  Building CMake → `C:\Users\adurmus\.julia\packages\CMake\ZGawK\deps\build.log`
  Building Blosc → `C:\Users\adurmus\.julia\packages\Blosc\lzFr0\deps\build.log`
  Building HDF5 ─→ `C:\Users\adurmus\.julia\packages\HDF5\ZOkE7\deps\build.log`
┌ Error: Error building `HDF5`:
│ ERROR: Can not delete output file : Access is denied. : C:\Users\adurmus\.julia\packages\WinRPM\Y9
QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\zlib1.dll
│ [ Info: Updating WinRPM package list
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:
/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:
/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:
/mingw:/win64/openSUSE_Leap_42.2/repodata/1c7e173bab2485c9908a41326e0ab5b75e3fadd0aa6698b693407bcf82
4ceb4b-primary.xml.gz
│ ┌ Info: Packages to update:
│ └   join(names(toup), ", ") = "zlib1"
│ ┌ Info: Packages to install:
│ └   join(names(todo), ", ") = "hdf5"
│ ┌ Info: Downloading:
│ └   name = "zlib1"
│ ┌ Info: Extracting:
│ └   name = "zlib1"
│ ERROR: LoadError: MethodError: no method matching pipeline_error(::Int64)
│ Closest candidates are:
│   pipeline_error(!Matched::Base.ProcessChain) at process.jl:701
│   pipeline_error(!Matched::Base.Process) at process.jl:694
│ Stacktrace:
│  [1] macro expansion at .\logging.jl:309 [inlined] (repeats 2 times)
│  [2] do_install(::WinRPM.Package) at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:4
65
│  [3] do_install at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│  [4] macro expansion at .\logging.jl:318 [inlined]
│  [5] #install#19(::Bool, ::Function, ::WinRPM.Package) at C:\Users\adurmus\.julia\packages\WinRPM\
Y9QdZ\src\WinRPM.jl:385
│  [6] #install at .\none:0 [inlined]
│  [7] #install#17 at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│  [8] #install at .\none:0 [inlined] (repeats 2 times)
│  [9] (::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM})() at C:\Users\adurmus\.julia\packages\Win
RPM\Y9QdZ\src\winrpm_bindeps.jl:42
│  [10] run(::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM}) at C:\Users\adurmus\.julia\packages\B
inDeps\ZEval\src\BinDeps.jl:478
│  [11] macro expansion at .\logging.jl:308 [inlined]
│  [12] run(::BinDeps.SynchronousStepCollection) at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\s
rc\BinDeps.jl:518
│  [13] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\adurmus\.julia\packag
es\BinDeps\ZEval\src\dependencies.jl:944
│  [14] satisfy!(::BinDeps.LibraryDependency) at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\
dependencies.jl:922
│  [15] top-level scope at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
│  [16] include at .\boot.jl:317 [inlined]
│  [17] include_relative(::Module, ::String) at .\loading.jl:1038
│  [18] include(::Module, ::String) at .\sysimg.jl:29
│  [19] include(::String) at .\client.jl:388
│  [20] top-level scope at none:0
│ in expression starting at C:\Users\adurmus\.julia\packages\HDF5\ZOkE7\deps\build.jl:39
│
│ 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
│
│ Scanning the drive for archives:
│ 1 file, 95048 bytes (93 KiB)
│
│ Extracting archive: C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\cache\2\mingw64-zlib1-1.2.11-1.1
.noarch.cpio
│ --
│ Path = C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\cache\2\mingw64-zlib1-1.2.11-1.1.noarch.cpio
│ Type = Cpio
│ Physical Size = 95048
│ SubType = New ASCII
│
│
│ Sub items Errors: 1
│
│ Archives with Errors: 1
│
│ Sub items Errors: 1
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\
stdlib\v1.0\Pkg\src\Operations.jl:1068

I am using a company computer but the IT department has told me I have full admin rights.

Have you tried staying Julia as an admin (right click - → start as administrator)? I don’t think I’ve seen this with Julia yet but had similar issues with conda before on corporate machines which were solved in this way.

Yes I have tried it now. I get the same error when I try to build the package even after running Julia as admin.

(v1.0) pkg> build HDF5
  Building LibCURL ─→ `C:\Users\adurmus\.julia\packages\LibCURL\OoXMv\deps\build.log`
  Building WinRPM ──→ `C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\deps\build.log`
  Building Homebrew → `C:\Users\adurmus\.julia\packages\Homebrew\l8kUw\deps\build.log`
  Building CMake ───→ `C:\Users\adurmus\.julia\packages\CMake\ZGawK\deps\build.log`
  Building Blosc ───→ `C:\Users\adurmus\.julia\packages\Blosc\lzFr0\deps\build.log`
  Building HDF5 ────→ `C:\Users\adurmus\.julia\packages\HDF5\ZOkE7\deps\build.log`
┌ Error: Error building `HDF5`:
│ ERROR: Can not delete output file : Access is denied. : C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\zlib1.dll
│ [ Info: Updating WinRPM package list
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
│ ┌ Info: Packages to update:
│ └   join(names(toup), ", ") = "zlib1"
│ ┌ Info: Packages to install:
│ └   join(names(todo), ", ") = "hdf5"
│ ┌ Info: Downloading:
│ └   name = "zlib1"
│ ┌ Info: Extracting:
│ └   name = "zlib1"
│ ERROR: LoadError: MethodError: no method matching pipeline_error(::Int64)
│ Closest candidates are:
│   pipeline_error(!Matched::Base.ProcessChain) at process.jl:701
│   pipeline_error(!Matched::Base.Process) at process.jl:694
│ Stacktrace:
│  [1] macro expansion at .\logging.jl:309 [inlined] (repeats 2 times)
│  [2] do_install(::WinRPM.Package) at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:465
│  [3] do_install at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│  [4] macro expansion at .\logging.jl:318 [inlined]
│  [5] #install#19(::Bool, ::Function, ::WinRPM.Package) at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:385
│  [6] #install at .\none:0 [inlined]
│  [7] #install#17 at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│  [8] #install at .\none:0 [inlined] (repeats 2 times)
│  [9] (::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM})() at C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\src\winrpm_bindeps.jl:42
│  [10] run(::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM}) at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:478
│  [11] macro expansion at .\logging.jl:308 [inlined]
│  [12] run(::BinDeps.SynchronousStepCollection) at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:518
│  [13] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\dependencies.jl:944
│  [14] satisfy!(::BinDeps.LibraryDependency) at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\dependencies.jl:922
│  [15] top-level scope at C:\Users\adurmus\.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
│  [16] include at .\boot.jl:317 [inlined]
│  [17] include_relative(::Module, ::String) at .\loading.jl:1038
│  [18] include(::Module, ::String) at .\sysimg.jl:29
│  [19] include(::String) at .\client.jl:388
│  [20] top-level scope at none:0
│ in expression starting at C:\Users\adurmus\.julia\packages\HDF5\ZOkE7\deps\build.jl:39
│
│ 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
│
│ Scanning the drive for archives:
│ 1 file, 95048 bytes (93 KiB)
│
│ Extracting archive: C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\cache\2\mingw64-zlib1-1.2.11-1.1.noarch.cpio
│ --
│ Path = C:\Users\adurmus\.julia\packages\WinRPM\Y9QdZ\cache\2\mingw64-zlib1-1.2.11-1.1.noarch.cpio
│ Type = Cpio
│ Physical Size = 95048
│ SubType = New ASCII
│
│
│ Sub items Errors: 1
│
│ Archives with Errors: 1
│
│ Sub items Errors: 1
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1068

Try adding exclusions on the antivirus and firewall. Add all Julia folders (or executables), where the executable is and the one at the user space and the folder with Juno or VS Code.

You can also manually delete the zlib1.dll file. And of course running Julia with admin rights.

1 Like

I cannot claim much expertise on this, but I can tell you that I have HDF5.jl installed on a Win10 non-admin account. So it (sometimes) works.

Looking at your post, I would guess that this is the key:

ERROR: Can not delete output file : Access is denied. : C:\Users\adurmus.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\zlib1.dl

I agree with the previous suggestion of deleting this file manually and then redoing the installation.

1 Like

Eventually manually deleting it solved the problem. Thanks a lot for your helps and responses.