# Issues using HDF5 package

**URL:** https://discourse.julialang.org/t/issues-using-hdf5-package/34769
**Category:** General Usage
**Tags:** question, package
**Created:** [February 17, 2020, 7:12pm UTC](https://discourse.julialang.org/t/issues-using-hdf5-package/34769 "2020-02-17T19:12:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![natepage](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@natepage](https://discourse.julialang.org/u/natepage)
#### Post date: [February 17, 2020, 7:12pm UTC](https://discourse.julialang.org/t/issues-using-hdf5-package/34769/1 "2020-02-17T19:12:31Z")

</div>

I have downloaded the HDF5 package using the “add” command and I have made a small program that currently just reads an HDF5 file and prints some of the data. However I am getting the following error when I try to run the program:

ERROR: LoadError: UndefVarError: libhdf5 not defined  
Stacktrace:  
[1] h5\_get\_libversion() at C:\Users\Nate Page.julia\packages\HDF5\Zh9on\src\HDF5.jl:38  
[2] top-level scope at C:\Users\Nate Page.julia\packages\HDF5\Zh9on\src\HDF5.jl:44  
[3] include at .\boot.jl:328 [inlined]  
[4] include\_relative(::Module, ::String) at .\loading.jl:1105  
[5] include(::Module, ::String) at .\Base.jl:31  
[6] top-level scope at none:2  
[7] eval at .\boot.jl:330 [inlined]  
[8] eval(::Expr) at .\client.jl:425  
[9] top-level scope at .\none:3  
in expression starting at C:\Users\Nate Page.julia\packages\HDF5\Zh9on\src\HDF5.jl:44  
ERROR: LoadError: Failed to precompile HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] to C:\Users\Nate Page.julia\compiled\v1.3\HDF5\L7Dga\_8EvRd.ji.  
Stacktrace:  
[1] error(::String) at .\error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283  
[3] \_require(::Base.PkgId) at .\loading.jl:1024  
[4] require(::Base.PkgId) at .\loading.jl:922  
[5] require(::Module, ::Symbol) at .\loading.jl:917  
[6] include at .\boot.jl:328 [inlined]  
[7] include\_relative(::Module, ::String) at .\loading.jl:1105  
[8] include(::Module, ::String) at .\Base.jl:31  
[9] exec\_options(::Base.JLOptions) at .\client.jl:287  
[10] \_start() at .\client.jl:460

I’m not quite sure what I need to do to fix this issue.

Thanks

---

<div class="post-metadata">

### Author: ![rro](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rro](https://discourse.julialang.org/u/rro)
#### Post date: [February 28, 2020, 2:59pm UTC](https://discourse.julialang.org/t/issues-using-hdf5-package/34769/2 "2020-02-28T14:59:06Z")

</div>

Hi, I just had the same error.  
I removed the package from Julia Pkg.rm(“HDF5”) and the directory “Zh9on” in .julia\packages\HDF5  
then ENV[“CMAKE\_JL\_BUILD\_FROM\_SOURCE”] = 1; Pkg.build(“Cmake”)  
now Pkg.add(“HDF5”);  
using HDF5 should now work

Cheers
