# Pkg.add not working

**URL:** <https://discourse.julialang.org/t/pkg-add-not-working/4242>\
**Category:** New to Julia\
**Created:** [June 13, 2017, 11:59am UTC](https://discourse.julialang.org/t/pkg-add-not-working/4242 "2017-06-13T11:59:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amulya\_Yadav](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Amulya\_Yadav](https://discourse.julialang.org/u/Amulya_Yadav)\
**Post date:** [June 13, 2017, 11:59am UTC](https://discourse.julialang.org/t/pkg-add-not-working/4242/1 "2017-06-13T11:59:21Z")

</div>

Hi,

I tried to run a julia script with a single line  
Pkg.add(“JuMP”)

Upon running this script with “julia .jl”, I get the following weird error:

julia\> Pkg.add(“JuMP”)  
INFO: Initializing package repository /home/rcf-40/amulyaya/.julia/v0.5  
INFO: Cloning METADATA from [https://github.com/JuliaLang/METADATA.jl](https://github.com/JuliaLang/METADATA.jl)  
ERROR: GitError(Code:ERROR, Class:None, No errors)  
in macro expansion at ./libgit2/error.jl:99 [inlined]  
in clone(::String, ::String, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191  
in #clone#112(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::String) at ./libgit2/libgit2.jl:327  
in (::Base.LibGit2.#kw##clone)(::Array{Any,1}, ::Base.LibGit2.#clone, ::String, ::String) at ./:0  
in (::Base.Pkg.Dir.##4#6{String,String})() at ./pkg/dir.jl:49  
in cd(::Base.Pkg.Dir.##4#6{String,String}, ::String) at ./file.jl:59  
in init(::String, ::String) at ./pkg/dir.jl:47  
in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:28  
in add(::String) at ./pkg/pkg.jl:100

Does anyone have any idea how to fix this?

---

<div class="post-metadata">

**Author:** ![jballanc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jballanc/32/328_2.png) [@jballanc](https://discourse.julialang.org/u/jballanc)\
**Post date:** [June 13, 2017, 3:27pm UTC](https://discourse.julialang.org/t/pkg-add-not-working/4242/2 "2017-06-13T15:27:47Z")

</div>

Looks like Julia is having an issue creating its `METADATA` directory from GitHub. I presume `/home/rcf-40/amulyaya` is your home directory? If so, does `~/.julia/v0.5/` exist? Do you have write permissions to your home directory (and space on the drive where your home directory is located)? How about `~/.julia/v0.5/METADATA/`? If that exists, what happens if you `cd` into it and run `git status`?

---

<div class="post-metadata">

**Author:** ![Amulya\_Yadav](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Amulya\_Yadav](https://discourse.julialang.org/u/Amulya_Yadav)\
**Post date:** [June 13, 2017, 11:50pm UTC](https://discourse.julialang.org/t/pkg-add-not-working/4242/3 "2017-06-13T23:50:16Z")

</div>

The issue was that in trying to create the METADATA directory, my laptop was running out of space. I deleted some files and it worked like a charm.

Thanks for the help!
