无法安装julia包

时间:2015-03-05 16:47:33

标签: julia

我在julia安装软件包时遇到问题我已经下载了最新的julia版本并且我已经运行了:

Pkg.init()

然后我尝试添加一个包,它会抛出一个错误。我删除了/.julia目录以进行全新安装,但似乎没有任何工作。对于发生了什么有任何想法?

julia> Pkg.add("Distributions")

INFO: Cloning cache of ArrayViews from git://github.com/JuliaLang/ArrayViews.jl.git
fatal: unable to access 'https://github.com//JuliaLang/ArrayViews.jl.git/': The requested URL returned error: 400
ERROR: unlink: no such file or directory (ENOENT)
 in wait at task.jl:51
 in sync_end at /Applications/Julia-0.3.6.app/Contents/Resources/julia/lib/julia/sys.dylib
 in add at pkg/entry.jl:319
 in add at pkg/entry.jl:71
 in anonymous at pkg/dir.jl:28
 in cd at /Applications/Julia-0.3.6.app/Contents/Resources/julia/lib/julia/sys.dylib
 in __cd#228__ at /Applications/Julia-0.3.6.app/Contents/Resources/julia/lib/julia/sys.dylib
 in add at pkg.jl:20

版本信息:

julia> versioninfo()

Julia Version 0.3.6
Commit 0c24dca* (2015-02-17 22:12 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

git命令:

> git config --get-regexp '^url.*'

url.https://github.com/.insteadof git://github.com
url.https://.insteadof git://

2 个答案:

答案 0 :(得分:5)

问题在于您的git配置。您有两个URL重写规则。 github特定的一个是冗余的,并且在其匹配规则中缺少尾部反斜杠。你可以简单地删除它:

git config --global --unset url.https://github.com/.insteadof

答案 1 :(得分:2)

可能是防火墙问题,请尝试运行

git config --global url."https://".insteadOf git://

described in the manual