我按照[平台特定说明(https://julialang.org/downloads/platform.html)中的说明,使用yum和epel在CentOS机器上安装了julia(v1.1.1)。
Julia正常工作,但是在预编译软件包(例如using DataFrames
)时,我得到了
[ Info: Precompiling GLM [38e38edf-8417-5370-95a0-9cbb8c7f171a]
ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.build("Arpack").
Currently, the build command might fail when Julia has been built from source
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
我对编译,从源代码构建等方面了解不足,无法解决此问题。我想如果我只是从主页下载Julia并从该文件夹中使用它,那将很好用。但是我更喜欢通过包管理器使用它来自动接收更新。
我该如何解决?
答案 0 :(得分:2)
不幸的是,这是可以预期的,因为Arpack.jl期望OpenBLAS被称为libopenblas64_.so.0,而在Fedora / CentOS中则是libopenblasp64_.so.0。您可以使用Gson gson = new Gson();
JsonObject jsonObject = gson.fromJson("json string", JsonObject.class);
// Access the name of the first `authenticator`
System.out.println(jsonObject.getAuthenticators().get(0).getName());
解决此问题。我将尝试与Arpack.jl开发人员一起找到解决方案。
答案 1 :(得分:0)
因此,我最终在原始julialang页面的帮助下解决了这个问题。由于某些原因,如果通过Arpack
(启用epel)安装julia,则无法构建# yum install julia
。 Pkg.build("Arpack")
失败。
如果从官方页面下载julia并将其添加到path,它仍然会抛出相同的错误消息。但是,如果您启动julia并事先运行Pkg.build("Arpack")
,则效果很好!
答案 2 :(得分:0)
我确认@ MilanBouchet-Valat解决方案有效。这是有关Debian发行版的一些详细信息。
我已经使用Debian 4.19.37-5软件包管理器(例如synaptic)安装了Julia。我有
julia> versioninfo()
打印
Julia Version 1.0.4
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E5-2603 v3 @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
在朱莉娅下,尝试安装 Arpack 软件包时出现“预期”错误:
(v1.0) pkg> add Arpack
打印
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[7d9fca2a] + Arpack v0.3.1
Updating `~/.julia/environments/v1.0/Manifest.toml`
[no changes]
然后
julia> using Arpack
打印
[ Info: Precompiling Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97]
ERROR: LoadError: No deps.jl file could be found. Please try running
Pkg.build("Arpack").
Currently, the build command might fail when Julia has been built from source
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
Stacktrace:
[1] top-level scope at /home/picaud/.julia/packages/Arpack/cu5By/src/Arpack.jl:19
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1044
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:393
[8] top-level scope at ./none:3
in expression starting at /home/picaud/.julia/packages/Arpack/cu5By/src/Arpack.jl:16
ERROR: Failed to precompile Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97] to /home/picaud/.julia/compiled/v1.0/Arpack/X5VZL.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1203
[3] _require(::Base.PkgId) at ./loading.jl:960
[4] require(::Base.PkgId) at ./loading.jl:858
[5] require(::Module, ::Symbol) at ./loading.jl:853
但是
pkg> build Arpack
打印
Building Arpack → `~/.julia/packages/Arpack/cu5By/deps/build.log`
┌ Error: Error building `Arpack`:
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/picaud/.julia/packages/Arpack/cu5By/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/picaud/.julia/packages/BinaryProvider/TcAwt/src/Products.jl:414
│ [3] (::getfield(BinaryProvider, Symbol("#kw##write_deps_file")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at ./none:0
│ [4] top-level scope at none:0
│ [5] include at ./boot.jl:317 [inlined]
│ [6] include_relative(::Module, ::String) at ./loading.jl:1044
│ [7] include(::Module, ::String) at ./sysimg.jl:29
│ [8] include(::String) at ./client.jl:392
│ [9] top-level scope at none:0
│ in expression starting at /home/picaud/.julia/packages/Arpack/cu5By/deps/build.jl:74
└ @ Pkg.Operations /build/julia-gbfU8y/julia-1.0.4+dfsg/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1096
您可以使用以下方法检查这是否是一个依赖问题:
ldd ~/.julia/packages/Arpack/cu5By/deps/usr/lib/libarpack.so
打印
linux-vdso.so.1 (0x00007ffc179a1000)
libopenblas64_.so.0 => not found <----
libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007feea073d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feea05ba000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007feea05a0000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007feea0557000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feea0396000)
/lib64/ld-linux-x86-64.so.2 (0x00007feea0c67000)
Debian发行版:
find /usr/lib/ -name libopenblas\*
打印
/usr/lib/x86_64-linux-gnu/libopenblas.so
/usr/lib/x86_64-linux-gnu/libopenblasp-r0.3.6.a
/usr/lib/x86_64-linux-gnu/libopenblas64_.so.0
/usr/lib/x86_64-linux-gnu/julia/libopenblas.so
/usr/lib/x86_64-linux-gnu/libopenblas.so.0
/usr/lib/x86_64-linux-gnu/libopenblas.a
/usr/lib/x86_64-linux-gnu/libopenblasp-r0.3.6.so
具有root权限(su)创建符号链接
ln -s /usr/lib/x86_64-linux-gnu/libopenblas.so /usr/lib/x86_64-linux-gnu/libopenblas64_.so.0
现在可以使用
pkg> build Arpack
Building Arpack → `~/.julia/packages/Arpack/cu5By/deps/build.log`
然后
using Arpack
[ Info: Precompiling Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97]
还可以