Problem installing IJulia: ZMQ Failed installation OSX Mojave

Hello guys,

I am having some issues using jupyter notebooks in 1.1.

I tried several “solutions” to the problem found in discourse but none of them worked so I ended up erasing my previous Julia installation and all the packages in $HOME/.julia.

I just downloaded again 1.1 and did add IJulia but I have the following errors:

[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: Blosc not installed properly, run Pkg.build("ZMQ"), restart Julia and try again
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] top-level scope at /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/src/ZMQ.jl:14
 [3] include at ./boot.jl:326 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:328 [inlined]
 [8] eval(::Expr) at ./client.jl:404
 [9] top-level scope at ./none:3
in expression starting at /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/src/ZMQ.jl:13
ERROR: LoadError: Failed to precompile ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] to /Users/davidbuchaca1/.julia/compiled/v1.1/ZMQ/CaaO6.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853
 [6] include at ./boot.jl:326 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:328 [inlined]
 [11] eval(::Expr) at ./client.jl:404
 [12] top-level scope at ./none:3
in expression starting at /Users/davidbuchaca1/.julia/packages/IJulia/gI2uA/src/IJulia.jl:36
ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to /Users/davidbuchaca1/.julia/compiled/v1.1/IJulia/nfu7T.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
 [3] _require(::Base.PkgId) at ./loading.jl:960
 [4] require(::Base.PkgId) at ./loading.jl:858
 [5] require(::Module, ::Symbol) at ./loading.jl:853

Any hints ?

Thank you

One of the error messages is:

Blosc not installed properly, run Pkg.build("ZMQ"), restart Julia and try again

Are you able to run Pkg.build("ZMQ") as it suggests? Or does that cause other errors?

Yes I tried to do that as well:

I’ve read in the forum that several people had problems with OSX Mojave.


(v1.1) pkg> build ZMQ
  Building ZMQ → `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
┌ Error: Error building `ZMQ`: 
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ ┌ Warning: Could not extract the platform key of https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-apple-darwin14.tar.gz; continuing...
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:185
│ [ Info: Downloading https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-apple-darwin14.tar.gz to /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/usr/downloads/ZMQ.x86_64-apple-darwin14.tar.gz...
│ ERROR: LoadError: Could not download https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-apple-darwin14.tar.gz to /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/usr/downloads/ZMQ.x86_64-apple-darwin14.tar.gz:
│ ErrorException("")
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] #download#89(::Bool, ::Function, ::String, ::String) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:498
│  [3] #download at ./none:0 [inlined]
│  [4] #download_verify#90(::Bool, ::Bool, ::Bool, ::Function, ::String, ::String, ::String) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/PlatformEngines.jl:567
│  [5] #download_verify at ./none:0 [inlined]
│  [6] #install#129(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:314
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at ./none:0
│  [8] top-level scope at /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/build.jl:44
│  [9] include at ./boot.jl:326 [inlined]
│  [10] include_relative(::Module, ::String) at ./loading.jl:1038
│  [11] include(::Module, ::String) at ./sysimg.jl:29
│  [12] include(::String) at ./client.jl:403
│  [13] top-level scope at none:0
│ in expression starting at /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/build.jl:40
│ [22:31:24] dyld: Library not loaded: @rpath/libssl.1.0.0.dylib
│ [22:31:24]   Referenced from: /Users/davidbuchaca1/anaconda3/lib/libssh2.1.dylib
│ [22:31:24]   Reason: image not found
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

I faced a similar issue couple of weeks back. For a quick fix I manually downloaded the file " ZMQ.x86_64-apple-darwin14.tar.gz" from specified internet destination, put it in “deps/usr/downloads/” folder and amended the build.jl file in " /ZMQ/ABGOx/deps" folder so as not to overwrite the download folder when building the package. I was able to successfully compile ZMQ.

Hope it also helps you.

1 Like

I don’t understand what you mean by put it in “deps/usr/downloads/” and ammend the build.jl. Besides, In my machine, I don’t have a $HOME/deps folder.

Inside build.jl I see

# Listing of files generated by BinaryBuilder:
download_info = Dict(
    Linux(:aarch64, :glibc) => ("$bin_prefix/ZMQ.aarch64-linux-gnu.tar.gz", "ce637adc7f8bbd0a628d1d468e790236b64dc0f41e4c3ead991842a564b413b9"),
    Linux(:aarch64, :musl) => ("$bin_prefix/ZMQ.aarch64-linux-musl.tar.gz", "13a1695fa47fb4d7ffdad55dfcd0fa4a66aad16235331aa7af4995be83f4e556"),
    Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/ZMQ.arm-linux-gnueabihf.tar.gz", "c7050cc3eb8e1ad81b9eedbb41a4b2a89383d698dd4931cc1b90239c3640ffe5"),
    Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/ZMQ.arm-linux-musleabihf.tar.gz", "e80977a6e6695846de6553448aa9d9d6482bfa52e5fcf536e227162e16322fb8"),
    Linux(:i686, :glibc) => ("$bin_prefix/ZMQ.i686-linux-gnu.tar.gz", "18f043e1179a2db4dc2867c9da73cbccf1b2fc6851280b07891898951fd8a950"),
    Linux(:i686, :musl) => ("$bin_prefix/ZMQ.i686-linux-musl.tar.gz", "9f2425ec361ecadc0e836ea8cb7f378839ae5dcef8205a85d42f513368f2b6a7"),
    Windows(:i686) => ("$bin_prefix/ZMQ.i686-w64-mingw32.tar.gz", "960cd3ee0443389e35614dbd5954f68fe969abc42b9b5d26c0339bf449854473"),
    Linux(:powerpc64le, :glibc) => ("$bin_prefix/ZMQ.powerpc64le-linux-gnu.tar.gz", "51eb2313e6552a7d2eaf4bb2167b3498fbc16dfbab070bfb9a0a3788a2e64f6d"),
    MacOS(:x86_64) => ("$bin_prefix/ZMQ.x86_64-apple-darwin14.tar.gz", "ee0aa673e4fdb1574ac2d6c7c3a22c3c03f8ca75928968f051f78a2c32941b20"),
    Linux(:x86_64, :glibc) => ("$bin_prefix/ZMQ.x86_64-linux-gnu.tar.gz", "59266a7b62b74da29389e058fe014bef31ff47ed83c021a6d0fd59053f428cd3"),
    Linux(:x86_64, :musl) => ("$bin_prefix/ZMQ.x86_64-linux-musl.tar.gz", "7a88e5c5f933dd1b67b23ae70a4c78e27324170140f0f42a355b5ae53a8794c4"),
    FreeBSD(:x86_64) => ("$bin_prefix/ZMQ.x86_64-unknown-freebsd11.1.tar.gz", "34c1c5077c114417b893ae8048b71ed3b7812875b9c789b33407e56fed5e3646"),
    Windows(:x86_64) => ("$bin_prefix/ZMQ.x86_64-w64-mingw32.tar.gz", "ba1e0394919d6e6eeda13e201278f754069d33967ee96043cb52505e05a9128b"),
)

Should I put the path of ZMQ.x86_64-apple-darwin14.tar.g in MacOS value and that’s it?

I just tried to change the Path of The file in the MacOS key as follows:

# Listing of files generated by BinaryBuilder:
download_info = Dict(
    Linux(:aarch64, :glibc) => ("$bin_prefix/ZMQ.aarch64-linux-gnu.tar.gz", "ce637adc7f8bbd0a628d1d468e790236b64dc0f41e4c3ead991842a564b413b9"),
    Linux(:aarch64, :musl) => ("$bin_prefix/ZMQ.aarch64-linux-musl.tar.gz", "13a1695fa47fb4d7ffdad55dfcd0fa4a66aad16235331aa7af4995be83f4e556"),
    Linux(:armv7l, :glibc, :eabihf) => ("$bin_prefix/ZMQ.arm-linux-gnueabihf.tar.gz", "c7050cc3eb8e1ad81b9eedbb41a4b2a89383d698dd4931cc1b90239c3640ffe5"),
    Linux(:armv7l, :musl, :eabihf) => ("$bin_prefix/ZMQ.arm-linux-musleabihf.tar.gz", "e80977a6e6695846de6553448aa9d9d6482bfa52e5fcf536e227162e16322fb8"),
    Linux(:i686, :glibc) => ("$bin_prefix/ZMQ.i686-linux-gnu.tar.gz", "18f043e1179a2db4dc2867c9da73cbccf1b2fc6851280b07891898951fd8a950"),
    Linux(:i686, :musl) => ("$bin_prefix/ZMQ.i686-linux-musl.tar.gz", "9f2425ec361ecadc0e836ea8cb7f378839ae5dcef8205a85d42f513368f2b6a7"),
    Windows(:i686) => ("$bin_prefix/ZMQ.i686-w64-mingw32.tar.gz", "960cd3ee0443389e35614dbd5954f68fe969abc42b9b5d26c0339bf449854473"),
    Linux(:powerpc64le, :glibc) => ("$bin_prefix/ZMQ.powerpc64le-linux-gnu.tar.gz", "51eb2313e6552a7d2eaf4bb2167b3498fbc16dfbab070bfb9a0a3788a2e64f6d"),
    #MacOS(:x86_64) => ("$bin_prefix/ZMQ.x86_64-apple-darwin14.tar.gz", 
    #"ee0aa673e4fdb1574ac2d6c7c3a22c3c03f8ca75928968f051f78a2c32941b20"),
    MacOS(:x86_64) => ("/Users/davidbuchaca1/deps/ZMQ.x86_64-apple-darwin14.tar", 
    "ee0aa673e4fdb1574ac2d6c7c3a22c3c03f8ca75928968f051f78a2c32941b20"),
    Linux(:x86_64, :glibc) => ("$bin_prefix/ZMQ.x86_64-linux-gnu.tar.gz", "59266a7b62b74da29389e058fe014bef31ff47ed83c021a6d0fd59053f428cd3"),
    Linux(:x86_64, :musl) => ("$bin_prefix/ZMQ.x86_64-linux-musl.tar.gz", "7a88e5c5f933dd1b67b23ae70a4c78e27324170140f0f42a355b5ae53a8794c4"),
    FreeBSD(:x86_64) => ("$bin_prefix/ZMQ.x86_64-unknown-freebsd11.1.tar.gz", "34c1c5077c114417b893ae8048b71ed3b7812875b9c789b33407e56fed5e3646"),
    Windows(:x86_64) => ("$bin_prefix/ZMQ.x86_64-w64-mingw32.tar.gz", "ba1e0394919d6e6eeda13e201278f754069d33967ee96043cb52505e05a9128b"),
)

But I still cannot make it work:

(v1.1) pkg> build ZMQ
  Building ZMQ → `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
┌ Error: Error building `ZMQ`: 
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ ┌ Warning: Could not extract the platform key of /Users/davidbuchaca1/deps/ZMQ.x86_64-apple-darwin14.tar; continuing...
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:185
│ ERROR: LoadError: Hash Mismatch!
│   Expected sha256:   ee0aa673e4fdb1574ac2d6c7c3a22c3c03f8ca75928968f051f78a2c32941b20
│   Calculated sha256: 28bc3c724ffc9d70e0b1e33b9e3d8c45ee68bf95ec81edbaf20c7fec187306d1
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] (::getfield(BinaryProvider, Symbol("##141#143")){Bool,String,String,String})(::IOStream) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:571
│  [3] #open#310(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(BinaryProvider, Symbol("##141#143")){Bool,String,String,String}, ::String) at ./iostream.jl:375
│  [4] open at ./iostream.jl:373 [inlined]
│  [5] #verify#140(::Bool, ::Bool, ::String, ::Function, ::String, ::String) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:557
│  [6] #verify at ./tuple.jl:0 [inlined]
│  [7] #install#129(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:311
│  [8] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at ./none:0
│  [9] top-level scope at /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/build.jl:47
│  [10] include at ./boot.jl:326 [inlined]
│  [11] include_relative(::Module, ::String) at ./loading.jl:1038
│  [12] include(::Module, ::String) at ./sysimg.jl:29
│  [13] include(::String) at ./client.jl:403
│  [14] top-level scope at none:0
│ in expression starting at /Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/build.jl:43
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

No, what @Ajaychat3 means is that you should find the folder for ZMQ under $HOME/.julia/packages/ZMQ/ABCD/deps/usr/downloads/ and place it there (replacing “ABCD” with the version slug of the appropriate version of ZMQ, found via import ZMQ; dirname(pathof(ZMQ))). Then make the changes to the build script as suggested and build ZMQ again.

1 Like

if you carefully look at the error screen, the file being downloaded from Github and getting stored in download folder as follows

Could not download https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-apple-darwin14.tar.gz to 
/Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/usr/downloads/ZMQ.x86_64-apple-darwin14.tar.gz

Since the file get downloaded as part of build process. you need to disable download if you manually download the file. The relevant line of code looks to be in “build.jl” in “Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/” folder.

if haskey(download_info, platform_key()) && !forcecompile
    url, tarball_hash = download_info[platform_key()]
    if !isinstalled(url, tarball_hash; prefix=prefix)
 ------------------------------------------       
       # Download and install binaries
        install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)
----------------
        # check again whether the dependency is satisfied, which
        # may not be true if dlopen fails due to a libc++ incompatibility (#176)
        unsatisfied = any(!satisfied(p; verbose=verbose) for p in products)
    end
end

Hope this helps.

1 Like

I have a question to Julia Developers. I find that building ZMQ and couple of other packages like GR, MbedTLS etc, the package file gets downloaded during build process. The file size in some cases is quite big. This increases the build time for these packages and breaks down if there is no active internet connection at that time.

I think all downloading of necessary files should happen when the package is added using “]add package” command. This should help reduce the build time as there would be no dependency on active internet connection during build process. It would also help save time should the package needs to be rebuilt.

Isn’t this what already happens? Adding packages already builds them, otherwise you would then have to manually run ] build MyPackage everytime you add a package that might need to be built.

I think this is not true for all the packages. And If the package need to be rebuilt because of adding some other packages, the whole download process happens afresh.

to give an example, i was using plots package and then added statsplots. The GR got built again and the same tar.gz file was downloaded again during build process.

I don’t get why I get in my first error message

│ ┌ Warning: Could not extract the platform key of https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-apple-darwin14.tar.gz; continuing...

But If I copy paste the url
https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-apple-darwin14.tar.gz

I download the file.

Your comments are indeed useful but I don’t understand many parts of build.jl so I really don’t know how to fix it.

It seems the problem is here:

        # Download and install binaries
        install(url, tarball_hash; prefix=prefix, force=true, verbose=verbose)

For example, I tried to write the path directly to the install method

install(tarball_path="/Users/davidbuchaca1/.julia/packages/ZMQ/ABGOx/deps/usr/downloads/ZMQ.x86_64-apple-darwin14.tar", force=true, verbose=verbose)

but the method does not exist (with the arguments I provide)

│ Closest candidates are:
│   install(!Matched::AbstractString, !Matched::AbstractString; prefix, tarball_path, force, ignore_platform, verbose) at /Users/davidbuchaca1/.julia/packages/BinaryProvider/TcAwt/src/Prefix.jl:277

And I can’t get a help for install

help?> install
search: instances ignorestatus InvalidStateException

Couldn't find install
Perhaps you meant findall or instances
  No documentation found.

  Binding install does not exist.```

Just try building ZMQ with “]build ZMQ”. This works on my windows computer.
I just downloaded the file and did not modify build.jl.

I have no idea why reinstalling anaconda did the trick but that is what I did.

I reinstalled anaconda, opened julia, tried to do using IJulia with the same errors. The difference was now I was able to build both ZMQ and MbedTLS without any issues and without changing any file.

Just need
Pkg.build(“MbedTLS”)
A wrapper around the mbed TLS and cryptography C libary.
Because many julia packages were created by C, such as ZMQ, so you need add “MbedTLS” firstly.