在1.0上添加并构建KNITRO.jl似乎可行,但是在运行using
时出现错误。
(v1.0) pkg> add KNITRO
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[no changes]
Updating `~/.julia/environments/v1.0/Manifest.toml`
[no changes]
(v1.0) pkg> build KNITRO
julia> using KNITRO
[ Info: Precompiling KNITRO [67920dd8-b58e-52a8-8622-53c4cffbe346]
ERROR: LoadError: syntax: extra token "KnitroProblem" after end of expression
Stacktrace:
[1] include at ./boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at ./loading.jl:1038
[3] include(::Module, ::String) at ./sysimg.jl:29
[4] top-level scope at none:2
[5] eval at ./boot.jl:319 [inlined]
[6] eval(::Expr) at ./client.jl:389
[7] top-level scope at ./none:3
in expression starting at
/home/svcarpacomp/.julia/packages/KNITRO/Zou9S/src/KNITRO.jl:37
ERROR: Failed to precompile KNITRO [67920dd8-b58e-52a8-8622-53c4cffbe346] to /home/svcarpacomp/.julia/compiled/v1.0/KNITRO/9GHjY.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
答案 0 :(得分:1)
假设您要抓取github上的副本并阅读错误消息,则它在KNITRO.jl的第37行失败:
type KnitroProblem
type
已过时。是[mutable] struct
。
当前版本显然适用于v0.6
。如果您尝试使用v0.7
,则应该抛出多个弃用警告。