JuliaPro在Linux下使用出现permission denied问题


#1

所用的套件为JuliaPro-1.1.1.1 for linux
可正常使用julia(启动时有部分错误1),但在pkg里面则会有如下报错2
1.

Press Enter to start Julia. 
ERROR: LoadError: IOError: stat: permission denied (EACCES)
Stacktrace:
 [1] stat(::String) at ./stat.jl:68
 [2] isdir at ./stat.jl:303 [inlined]
 [3] load_path_expand(::String) at ./initdefs.jl:164
 [4] load_path() at ./initdefs.jl:211
 [5] identify_package(::String) at ./loading.jl:211
 [6] find_package(::String) at ./loading.jl:150
 [7] top-level scope at /home/xxl/.julia_atom_1.1.1.1/packages/julia-client/script/boot_repl.jl:13
 [8] include at ./boot.jl:326 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:1038
 [10] include(::Module, ::String) at ./sysimg.jl:29
 [11] exec_options(::Base.JLOptions) at ./client.jl:267
 [12] _start() at ./client.jl:436
in expression starting at /home/xxl/.julia_atom_1.1.1.1/packages/julia-client/script/boot_repl.jl:1
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.1 (2019-05-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |


2. 
pkg> status
ERROR: IOError: stat: permission denied (EACCES)
Stacktrace:
 [1] stat(::String) at ./stat.jl:68
 [2] isdir at ./stat.jl:303 [inlined]
 [3] load_path_expand(::String) at ./initdefs.jl:164
 [4] active_project(::Bool) at ./initdefs.jl:200
 [5] active_project at ./initdefs.jl:188 [inlined]
 [6] find_project_file(::Nothing) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/Types.jl:211
 [7] Pkg.Types.EnvCache(::Nothing) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/Types.jl:279 (repeats 2 times)
 [8] Pkg.Types.Context() at ./util.jl:728
 [9] Context!(::Array{Pair{Symbol,Any},1}) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/Types.jl:369
 [10] Context! at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/REPLMode.jl:528 [inlined]
 [11] do_status!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/REPLMode.jl:616
 [12] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:742
 [13] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:741
 [14] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/REPLMode.jl:563
 [15] #do_cmd#31(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/REPLMode.jl:538
 [16] do_cmd at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/REPLMode.jl:534 [inlined]
 [17] (::getfield(Pkg.REPLMode, Symbol("##53#56")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/Pkg/src/REPLMode.jl:988
 [18] #invokelatest#1 at ./essentials.jl:742 [inlined]
 [19] invokelatest at ./essentials.jl:741 [inlined]
 [20] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/REPL/src/LineEdit.jl:2273
 [21] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/REPL/src/REPL.jl:1035
 [22] run_repl(::REPL.AbstractREPL, ::Any) at /home/buildbot/build-worker/worker/juliapro-release-centos7-0_6/build/tmp_julia/share/julia/stdlib/v1.1/REPL/src/REPL.jl:192
 [23] (::getfield(Base, Symbol("##734#736")){Bool,Bool,Bool,Bool})(::Module) at ./client.jl:362
 [24] #invokelatest#1 at ./essentials.jl:742 [inlined]
 [25] invokelatest at ./essentials.jl:741 [inlined]
 [26] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:346
 [27] exec_options(::Base.JLOptions) at ./client.jl:284
 [28] _start() at ./client.jl:436

JuliaPro安装位置在/opt/julia/ 安装使用了sudo权限, 安装完后对/opt/julia/文件夹进行了递归赋权sudo chmod 777 -R /opt/julia
最后出现了以上问题,不知如何是好。


#2

请使用下面命令:
chown your_user_name -R ~/.juliapro
chown your_user_name -R ~/.juliapro
注意将命令中your_user_name改称您的用户名。
祝好运!