Julia: Julia 1.9.0:ERROR: LoadError: able to open libLLVM!在W



当我在Julia 1.9.0 (Windows 11环境)中添加SeisIO包时,我得到一个错误消息,它向我介绍了&;error: error buildingLightXML: error: LoadError: Unable to open libLLVM!&;。代码如下:

(@v1.9) pkg> add SeisIO; build; precompile
Resolving package versions...
No Changes to `C:Users47136.juliaenvironmentsv1.9Project.toml`
No Changes to `C:Users47136.juliaenvironmentsv1.9Manifest.toml`
Building WebIO ────→ `C:Users47136.juliascratchspaces44cfe95a-1eb2-52ea-b672-e2afdf69b78f976d0738247f155d0dcd77607edea644f069e1e9build.log`
Building Blink ────→ `C:Users47136.juliascratchspaces44cfe95a-1eb2-52ea-b672-e2afdf69b78f8d0b679fd7caa49e2bca9214b131289e19808c0build.log`
Building PlotlyJS ─→ `C:Users47136.juliascratchspaces44cfe95a-1eb2-52ea-b672-e2afdf69b78f7452869933cd5af22f59557390674e8679ab2338build.log`
Building LightXML ─→ `C:Users47136.juliascratchspaces44cfe95a-1eb2-52ea-b672-e2afdf69b78fbe855e3c975b89746b09952407c156b5e4a33a1dbuild.log`
ERROR: Error building `LightXML`:
ERROR: LoadError: Unable to open libLLVM!
Stacktrace:
[1] error(s::String)
@ Base .error.jl:35
[2] (::BinaryProvider.var"#open_libllvm#124")()
@ BinaryProvider C:Users47136.juliapackagesBinaryProviderU2dKKsrcPlatformNames.jl:652
[3] detect_cxx11_string_abi()
@ BinaryProvider C:Users47136.juliapackagesBinaryProviderU2dKKsrcPlatformNames.jl:655
[4] detect_compiler_abi()
@ BinaryProvider C:Users47136.juliapackagesBinaryProviderU2dKKsrcPlatformNames.jl:668
[5] top-level scope
@ C:Users47136.juliapackagesBinaryProviderU2dKKsrcPlatformNames.jl:685
[6] include(mod::Module, _path::String)
@ Base .Base.jl:457
[7] include(x::String)
@ BinaryProvider C:Users47136.juliapackagesBinaryProviderU2dKKsrcBinaryProvider.jl:1
[8] top-level scope
@ C:Users47136.juliapackagesBinaryProviderU2dKKsrcBinaryProvider.jl:12
[9] include
@ .Base.jl:457 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
@ Base .loading.jl:2012
[11] top-level scope
@ stdin:2
in expression starting at C:Users47136.juliapackagesBinaryProviderU2dKKsrcPlatformNames.jl:685
in expression starting at C:Users47136.juliapackagesBinaryProviderU2dKKsrcBinaryProvider.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to "C:\Users\47136\.julia\compiled\v1.9\BinaryProvider\jl_9954.tmp".
Stacktrace:
[1] error(s::String)
@ Base .error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .loading.jl:2262
[3] compilecache
@ .loading.jl:2129 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .loading.jl:1772
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .loading.jl:1623
[6] macro expansion
@ .loading.jl:1611 [inlined]
[7] macro expansion
@ .lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .loading.jl:1574
[9] include(fname::String)
@ Base.MainInclude .client.jl:478
[10] top-level scope
@ C:Users47136.juliapackagesLightXMLW8FVTdepsbuild.jl:1
[11] include(fname::String)
@ Base.MainInclude .client.jl:478
[12] top-level scope
@ none:5
in expression starting at C:Users47136.juliapackagesLightXMLW8FVTdepsbuild_Zlib.v1.2.11.jl:1
in expression starting at C:Users47136.juliapackagesLightXMLW8FVTdepsbuild.jl:1

我已经通过versioninfo:

检查了libLLVM的版本
julia> versioninfo()
Julia Version 1.9.0-rc2
Commit 72aec423c2 (2023-04-01 10:41 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 1 on 12 virtual cores
Environment:
JULIA_PKG_SERVER = https://mirrors.bfsu.edu.cn/julia

我已经更新了Julia的版本,包的版本,但是我没有再次安装LLVM。我希望找到无法打开libLLVM&quot的原因并修复它,并在win11环境下将SeisIO包添加到我的Julia中,谢谢!

在julia提示下运行@show Base.libllvm_path()查看是否有dll文件,然后复制并将该文件重命名为libLLVM.dll

julia> @show Base.libllvm_path()
Base.libllvm_path() = Symbol("D:\Dev\Julia\bin\libLLVM-14jl.dll")
Symbol("D:\Dev\Julia\bin\libLLVM-14jl.dll")

对于Win10,当我用Julia-1.9.2构建LibPQ时遇到了同样的问题,并且这种方法有效!

SeisIO在撰写此回答时似乎已经超过2年没有更新了。你所描述的错误是一个已知的问题,在这里报告:

https://github.com/jpjones76/SeisIO.jl/issues/93

你可以尝试在旧的Julia版本上安装这个包——repo建议包的作者在某些时候试图让Julia 1.6的测试通过,但这不起作用,所以它可能在Julia 1.5或1.4上起作用。

或者同时,你可以试着联系作者,看看他们是否有兴趣更新包以使用最新的Julia版本。

相关内容

  • 没有找到相关文章

最新更新