3

I just install julia in ubuntu and found some problems when I added a package.

julia> Pkg.Add("Gadfly")
ERROR: UndefVarError: Add not defined

I also tried to update julia but an error popped up:

julia> Pkg.update()
INFO: Initializing package repository /home/jing/.julia/v0.5
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Connection timed out

ERROR: failed process: Process(git clone -q -b metadata-v2 git://github.com/JuliaLang/METADATA.jl METADATA, ProcessExited(128)) [128]
in run at ./process.jl:531
in anonymous at pkg/dir.jl:52
in cd at ./file.jl:22
in init at pkg/dir.jl:50
in cd at pkg/dir.jl:28
in update at ./pkg.jl:45

Could anyone please help me fix this problem? Thanks!!

Reza Afzalan
  • 5,646
  • 3
  • 26
  • 44
jeanne
  • 33
  • 3
  • 1
    I just noticed that I should use Pkg.add(...) with lower case of "add", but I still got the same error as what Pkg.update(...) responded. – jeanne Oct 27 '15 at 21:35

1 Answers1

4

The key message here is

fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Connection timed out

It seems you didn't have an internet connection when this was run. Make sure you have internet and that you can access github on the machine this is running on.

Shelvacu
  • 4,245
  • 25
  • 44
  • 1
    You are right. I referred the doc http://julia.readthedocs.org/en/latest/manual/packages/?highlight=insteadof#adding-and-removing-packages and fixed it successfully by entering command git config --global url."https://".insteadOf git:// in terminal. – jeanne Oct 27 '15 at 23:35