我在Julia中使用Gadfly
,然后我添加了包StatsModels
和GLM
,并在第using Gadfly
行显示了此错误:
INFO: Precompiling module Gadfly.
ERROR: LoadError: LoadError:
Stacktrace:
[1] AssertionError(::String) at ./coreimg.jl:14
[2] update_valid_age!(::UInt64, ::UInt64, ::Core.Inference.InferenceState) at ./inference.jl:2353
[3] add_backedge!(::Core.MethodInstance, ::Core.Inference.InferenceState) at ./inference.jl:2366
[4] abstract_call_gf_by_type(::Any, ::Any, ::Core.Inference.InferenceState) at ./inference.jl:1421
...
[217] include(::String) at ./sysimg.jl:14
[218] include_from_node1(::String) at ./loading.jl:576
[219] include(::String) at ./sysimg.jl:14
[220] anonymous at ./<missing>:2fatal: error thrown and no exception handler available.
Base.MethodError(f=typeof(Core.Inference.convert)(), args=(Base.AssertionError, "invalid age range update"), world=0x0000000000000ac5)
rec_backtrace at /Users/osx/buildbot/slave/package_osx64/build/src/stackwalk.c:84
record_backtrace at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:245 [inlined]
jl_throw at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:564
...
jlcall__start_18991 at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
true_main at /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia (unknown line)
main at /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia (unknown line)
ERROR: LoadError: Failed to precompile Gadfly to /Users/mmorin/.julia/lib/v0.6/Gadfly.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:710
[2] _require(::Symbol) at ./loading.jl:497
[3] require(::Symbol) at ./loading.jl:405
[4] include_from_node1(::String) at ./loading.jl:576
[5] include(::String) at ./sysimg.jl:14
while loading /Users/mmorin/RED/Figure1.jl, in expression starting on line 3
整条消息有400行,堆栈跟踪深度为200级,所以为了简洁,我粘贴了最相关的位。我重新启动了Julia,使用StatsModels
删除了GLM
和Pkg.rm()
,然后删除并添加了Gadfly
,并得到完全相同的错误。我该如何解决?
答案 0 :(得分:0)
经过几个小时的搜索和尝试,我和朱莉娅专家交谈过。这看起来像编译器错误。虽然重置所有Julia软件包是不可取的,但唯一的解决方案是将~/.julia
移至备份:
mv ~/.julia ~/.julia_backup
然后重启Julia并运行
Pkg.add.(["Gadfly", "StatsModels", "GLM"])
using Gadfly, StatsModels, GLM