Julia的当前版本是0.4.6。然而,我运行的是开发版本0.5。突然,JLD就不能工作了。它已经安装并更新了。昨天我用JLD编译了代码,但是今天早上它不能工作。
julia> using JLD
INFO: Precompiling module JLD...
WARNING: Method definition convert(Type{#T<:AbstractString}, AbstractArray{#S<:Union{Char, Int32, UInt32}, 1}) in module Base at unicode/utf32.jl:131 overwritten in module LegacyStrings at /root/.julia/v0.5/LegacyStrings/src/utf32.jl:133.
WARNING: Method definition isvalid(Array{Char, 1}) in module Base at unicode/utf32.jl:177 overwritten in module LegacyStrings at /root/.julia/v0.5/LegacyStrings/src/utf32.jl:179.
WARNING: New definition
string(Union{Char, LegacyStrings.UTF8String, LegacyStrings.ASCIIString}...) at /root/.julia/v0.5/LegacyStrings/src/utf8.jl:161
is ambiguous with:
string(Union{Char, UTF8String, ASCIIString}...) at unicode/utf8.jl:166.
To fix, define
string(Char...)
before the new definition.
WARNING: both LegacyStrings and Base export "UTF16String"; uses of it in module JLD must be qualified
ERROR: LoadError: LoadError: UndefVarError: UTF16String not defined
in include(::ASCIIString) at ./boot.jl:234
in include_from_node1(::ASCIIString) at ./loading.jl:417
in include(::ASCIIString) at ./boot.jl:234
in include_from_node1(::ASCIIString) at ./loading.jl:417
[inlined code] from ./boot.jl:237
in anonymous at ./<no file>:4294967295
in eval(::Module, ::Any) at ./boot.jl:237
[inlined code] from ./sysimg.jl:11
in process_options(::Base.JLOptions) at ./client.jl:239
in _start() at ./client.jl:318
while loading /root/.julia/v0.5/JLD/src/jld_types.jl, in expression starting on line 11
while loading /root/.julia/v0.5/JLD/src/JLD.jl, in expression starting on line 130
ERROR: Failed to precompile JLD to /root/.julia/lib/v0.5/JLD.ji
in error(::ASCIIString) at ./error.jl:21
in compilecache(::ASCIIString) at ./loading.jl:496
in compilecache(::Symbol) at ./loading.jl:485
in require(::Symbol) at ./loading.jl:355
in eval(::Module, ::Any) at ./boot.jl:237发布于 2016-07-16 15:59:19
当使用Julia的开发版本时,您需要使用开发版本的包(这适用于开发人员让master保持最新但尚未标记的包)。如果您运行Pkg.checkout("JLD")来签出主机,JLD应该可以工作(在我的机器上工作。注意:您可能需要在签出之前执行Pkg.update(),并且可能需要退出Julia并重新打开它以重新编译新版本)。
但是需要注意的是,不要将Julia的开发版本作为一种测试方式。请记住,语言仍然是alpha语言,并且不能保证包生态系统或Julia本身将与daily master一起工作。这些日报很适合用来编写语言和为下一个版本准备包(我想是很大胆的)。
发布于 2016-07-15 22:09:54
那么,您使用的是Julia0.5,它还在开发中。如果你切换到0.4.6,那么应该没问题。我正在使用它,JLD对我来说工作得很好。您也可以尝试运行Pkg.update(),关闭Julia,然后重新打开,看看是否有帮助。
https://stackoverflow.com/questions/38392698
复制相似问题