packagejuliadifferentialequations.jl

Failure to precompile DifferentialEquations on Julia - Issue with MKL_jll?


When trying to precompile the Differential Equations package on Julia, one of the dependencies - MKL_jll specifically - repeatedly fails to precompile. I get the error message 'could not load library "path to one of the folders in artifacts"

'Error message after precompiling from scratch.

When I was originally attempting to install DifferentialEquations, there were 16 errored dependencies, and when I tried to precompile them separately, it gave me a similar message. As per some other suggestions, I tried clearing out my Julia cache and reattempting, but that didn't seem to solve the issue. I also tried removing the errored dependencies independently via Pkg.rm(), updating packages via Pkg.update(), and clearing out .julia\compiled before precompiling from scratch (my most recent attempt). I originally had the DifferentialEquations package installed and compiling properly, but since I uninstalled and reinstalled Julia, I've been having this issue.


Solution

  • This looks like a corrupt package depot.

    1. You can try to rebuilt MKL_jll: using Pkg; Pkg.build("MKL_jll"). This could redownload dependencies
    2. Try removing .julia folder entirely, not just compiled
    3. Reinstalling Julia does not help in such cases - unless you upgrade to the latest version which is always good idea
    4. Some Julia versions on some Windows versions used to have problems with access rights. This could result in errors similar to the one you are observing. In such cases running the Julia console as an administrator and then performing package management tasks used to help. (However this should be resolved by now)

    One of the above things always helps.