Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julialang tells ERROR: UndefVarError: Pkg not defined

Tags:

julia

On a ubuntu 16.04,I downloaded julialang 1.0 binary package from

https://julialang.org/downloads/

,and extract it under:

/usr/local/julia

changed own and group to root,and added bin and lib to corresponded path:

#Julia
export JULIA_HOME=/usr/local/julia
export PATH=$JULIA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$JULIA_HOME/lib:$LD_LIBRARY_PATH

then go to julia console to run:

Pkg.status()

got

ERROR: UndefVarError: Pkg not defined

anything I missed?

like image 654
Alex Luya Avatar asked Aug 11 '18 00:08

Alex Luya


Video Answer


1 Answers

Pkg is no longer loaded by default, so it needs to be loaded:

julia> using Pkg
like image 150
Isaiah Norton Avatar answered Sep 29 '22 05:09

Isaiah Norton