Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not load library "libz"- Failed to precompile #65

Open
hannahrocio opened this issue Jul 12, 2021 · 1 comment
Open

could not load library "libz"- Failed to precompile #65

hannahrocio opened this issue Jul 12, 2021 · 1 comment

Comments

@hannahrocio
Copy link

I am running Julia on Mac OS 11.1, and running into an error when trying to precompile. I get the error message,

ERROR: LoadError: LoadError: error compiling top-level scope: could not load library "libz"
dlopen(libz.dylib, 1): image not found
Stacktrace:
[1] include at ./boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at ./loading.jl:1044
[3] include at ./sysimg.jl:29 [inlined]
[4] include(::String) at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/GZip/JNmGn/src/GZip.jl:2
[5] top-level scope at none:0
[6] include_relative(::Module, ::String) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[7] include(::Module, ::String) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[8] top-level scope at none:2
[9] eval at ./boot.jl:319 [inlined]
[10] eval(::Expr) at ./client.jl:393
[11] top-level scope at ./none:3
in expression starting at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/GZip/JNmGn/src/zlib_h.jl:13
in expression starting at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/GZip/JNmGn/src/GZip.jl:73
ERROR: LoadError: LoadError: LoadError: Failed to precompile GZip [92fee26a-97fe-5a0c-ad85-20a5f3185b63] to /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/compiled/v1.0/GZip/s2LKY.ji.
Stacktrace:
[1] error(::String) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[2] compilecache(::Base.PkgId, ::String) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[3] _require(::Base.PkgId) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[4] require(::Base.PkgId) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:? (repeats 2 times)
[5] include at ./boot.jl:317 [inlined]
[6] include_relative(::Module, ::String) at ./loading.jl:1044
[7] include at ./sysimg.jl:29 [inlined]
[8] include(::String) at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/MLDatasets/GU5Hj/src/MNIST/MNIST.jl:26
[9] top-level scope at none:0
[10] include at ./boot.jl:317 [inlined]
[11] include_relative(::Module, ::String) at ./loading.jl:1044
[12] include at ./sysimg.jl:29 [inlined]
[13] include(::String) at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/MLDatasets/GU5Hj/src/MLDatasets.jl:1
[14] top-level scope at none:0
[15] include_relative(::Module, ::String) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[16] include(::Module, ::String) at /Applications/JuliaPro-1.0.5-2.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
[17] top-level scope at none:2
[18] eval at ./boot.jl:319 [inlined]
[19] eval(::Expr) at ./client.jl:393
[20] top-level scope at ./none:3
in expression starting at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/MLDatasets/GU5Hj/src/MNIST/Reader/Reader.jl:2
in expression starting at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/MLDatasets/GU5Hj/src/MNIST/MNIST.jl:70
in expression starting at /Users/hannah/.juliapro/JuliaPro_v1.0.5-2/packages/MLDatasets/GU5Hj/src/MLDatasets.jl:45

I already tried adding zlib-ng with home-brew, but it didn't work. Would appreciate any suggestions :)
Thanks!

@johnnychen94
Copy link
Member

johnnychen94 commented Jul 27, 2021

This is expected to be a local issue and is likely to be a dirty package contents. Can you try with a clean depot path? For example, in the terminal you could do:

JULIA_DEPOT_PATH=tmp_depot julia

and reinstall this package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants