jinzhuo@jinzhuo-virtual-machine:~/code/MatrixProductStates.jl-master/examples$ julia rydberg_density_matrix.jl
ERROR: LoadError: LoadError: ArgumentError: Module LinearAlgebra not found in current path.
Run `Pkg.add("LinearAlgebra")` to install the LinearAlgebra package.
Stacktrace:
[1] _require(::Symbol) at ./loading.jl:428
[2] require(::Symbol) at ./loading.jl:398
[3] include_from_node1(::String) at ./loading.jl:569
while loading /home/jinzhuo/.julia/v0.6/MatrixProductStates/src/MatrixProductStates.jl, in expression starting on line 17
while loading /home/jinzhuo/code/MatrixProductStates.jl-master/examples/rydberg_density_matrix.jl, in expression starting on line 2
根据提示我进入Julia的REPL模式进行如下操作,以及报错
jinzhuo@jinzhuo-virtual-machine:~/code/MatrixProductStates.jl-master/examples$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> Pkg.add("LinearAlgebra")
ERROR: unknown package LinearAlgebra
macro expansion at ./pkg/entry.jl:53 [inlined]
(::Base.Pkg.Entry.##1#3{String,Base.Pkg.Types.VersionSet})() at ./task.jl:335
Stacktrace:
[1] sync_end() at ./task.jl:287
[2] macro expansion at ./task.jl:303 [inlined]
[3] add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
[4] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:36
[5] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:70
[6] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36
[7] add(::String) at ./pkg/pkg.jl:117
julia> using LinearAlgebra
ERROR: ArgumentError: Module LinearAlgebra not found in current path.
Run `Pkg.add("LinearAlgebra")` to install the LinearAlgebra package.
Stacktrace:
[1] _require(::Symbol) at ./loading.jl:428
[2] require(::Symbol) at ./loading.jl:398
jinzhuo@jinzhuo-virtual-machine:~/code/MatrixProductStates.jl-master/examples$ julia rydberg_density_matrix.jl
ERROR: LoadError: LoadError: ArgumentError: Module LinearAlgebra not found in current path.
Run `Pkg.add("LinearAlgebra")` to install the LinearAlgebra package.
Stacktrace:
[1] _require(::Symbol) at ./loading.jl:435
[2] require(::Symbol) at ./loading.jl:405
[3] include_from_node1(::String) at ./loading.jl:576
while loading /home/jinzhuo/.julia/v0.6/MatrixProductStates/src/MatrixProductStates.jl, in expression starting on line 17
while loading /home/jinzhuo/code/MatrixProductStates.jl-master/examples/rydberg_density_matrix.jl, in expression starting on line 2
julia> using CuArrays
INFO: Precompiling module CuArrays.
WARNING: CUDAdrv.jl has not been successfully built, and will not work properly.
...
WARNING: Please run Pkg.build() and restart Julia.
提示执行 Pkg.build 后重启,我用 Mac 端会出现 build("HomeBrew") 失败,Linux 没试过。版本太旧,可能还会有很多问题,除了搜 Google 也可以去英文论坛检索
julia> using CuArrays
INFO: Precompiling module CuArrays.
WARNING: CUDAdrv.jl has not been successfully built, and will not work properly.
WARNING: Please run Pkg.build("CUDAdrv") and restart Julia.
WARNING: CUDAdrv.jl has not been successfully built, and will not work properly.
WARNING: Please run Pkg.build("CUDAdrv") and restart Julia.
WARNING: LLVM.jl has not been configured, and will not work properly.
WARNING: Please run Pkg.build("LLVM") and restart Julia.
WARNING: LLVM.jl has not been configured, and will not work properly.
WARNING: Please run Pkg.build("LLVM") and restart Julia.
WARNING: CUDAnative.jl has not been successfully built, and will not work properly.
WARNING: Please run Pkg.build("CUDAnative") and restart Julia.
ERROR: LoadError: LoadError: LoadError: CUDAdrv.jl has not been configured.
Stacktrace:
[1] version() at /home/jinzhuo/.julia/v0.6/CUDAdrv/src/version.jl:10
[2] include_from_node1(::String) at ./loading.jl:576
[3] include(::String) at ./sysimg.jl:14
[4] include_from_node1(::String) at ./loading.jl:576
[5] include(::String) at ./sysimg.jl:14
[6] include_from_node1(::String) at ./loading.jl:576
[7] include(::String) at ./sysimg.jl:14
[8] anonymous at ./<missing>:2
while loading /home/jinzhuo/.julia/v0.6/CuArrays/src/blas/libcublas_types.jl, in expression starting on line 71
while loading /home/jinzhuo/.julia/v0.6/CuArrays/src/blas/CUBLAS.jl, in expression starting on line 10
while loading /home/jinzhuo/.julia/v0.6/CuArrays/src/CuArrays.jl, in expression starting on line 28
ERROR: Failed to precompile CuArrays to /home/jinzhuo/.julia/lib/v0.6/CuArrays.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:710
[2] _require(::Symbol) at ./loading.jl:497
[3] require(::Symbol) at ./loading.jl:405
当我继续执行Pkg.build("CUDAdrv")时出现
INFO: Building CUDAdrv
===================================================[ ERROR: CUDAdrv ]====================================================
LoadError: MethodError: no method matching dlopen(::Void)
Closest candidates are:
dlopen(::Symbol) at libdl.jl:94
dlopen(::Symbol, ::Integer) at libdl.jl:94
dlopen(::AbstractString) at libdl.jl:97
...
while loading /home/jinzhuo/.julia/v0.6/CUDAdrv/deps/build.jl, in expression starting on line 108
=========================================================================================================================
====================================================[ BUILD ERRORS ]=====================================================
WARNING: CUDAdrv had build errors.
- packages with build errors remain installed in /home/jinzhuo/.julia/v0.6
- build the package(s) and all dependencies with `Pkg.build("CUDAdrv")`
- build a single package by running its `deps/build.jl` script
=========================================================================================================================