# Problem in cloning or adding OpenCV.jl

**URL:** https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945
**Category:** Visualization
**Created:** [March 24, 2018, 5:11pm UTC](https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945 "2018-03-24T17:11:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tosalonijain](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tosalonijain/32/3624_2.png) [@tosalonijain](https://discourse.julialang.org/u/tosalonijain)
#### Post date: [March 24, 2018, 5:11pm UTC](https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945/1 "2018-03-24T17:11:57Z")

</div>

julia\> Pkg.clone(“[http://github.com/maxruby/OpenCV.jl](http://github.com/maxruby/OpenCV.jl)”)  
INFO: Cloning OpenCV from [http://github.com/maxruby/OpenCV.jl](http://github.com/maxruby/OpenCV.jl)  
ERROR: OpenCV already exists  
Stacktrace:  
[1] clone(::String, ::SubString{String}) at ./pkg/entry.jl:193  
[2] (::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:36  
[3] cd(::Base.Pkg.Dir.##4#7{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:70  
[4] #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{String,N} where N) at ./pkg/dir.jl:36  
[5] clone(::String) at ./pkg/pkg.jl:169

I am getting trouble in cloning, adding removing OpenCV.jl , its been marked as an unregistered package on running Pkg.status().  
If anyone could help me with this at the earliest ?

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [March 24, 2018, 6:43pm UTC](https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945/2 "2018-03-24T18:43:51Z")

</div>

Please post your code by copy-and-paste rather than a screenshot. Screenshots are harder to read and can’t be searched for by other people in the future.

I think your problem is that you did `Pkg.init("http://...OpenCV.jl.gi")`. That’s not what `Pkg.init()` is used for. `Pkg.init()` initializes your Julia package directory, and passing an argument to it tells Julia to use that URL instead of [https://github.com/JuliaLang/METADATA.jl](https://github.com/JuliaLang/METADATA.jl) when looking up package information. In essence, `Pkg.init("http://...OpenCV.jl")` tells Julia that it should look in the OpenCV repo for the version information of _every Julia package_.

You will, at the very least, need to fix that. You can fix your `METADATA` by doing:

```julia
Pkg.init()

```

and then I would suggest removing `~/.julia/v0.6/OpenCV` and repeating the `Pkg.clone("http://github.com/maxruby/OpenCV.jl")` step.

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [March 24, 2018, 6:46pm UTC](https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945/3 "2018-03-24T18:46:27Z")

</div>

Also I would strongly recommend deleting the screenshots in your original post because your transparent terminal background is revealing quite a lot of your personal Facebook page which you presumably do not want to post in public.

---

<div class="post-metadata">

### Author: ![tosalonijain](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tosalonijain/32/3624_2.png) [@tosalonijain](https://discourse.julialang.org/u/tosalonijain)
#### Post date: [March 24, 2018, 7:27pm UTC](https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945/4 "2018-03-24T19:27:26Z")

</div>

Thank you @rdeits for your concern. I shall take care of your advice regarding use of screen shot.  
Moreover Pkg.init() was the last choice. I tried removing .julia entirely and reconstructing it. Still, was troubled by the same error.

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [March 24, 2018, 7:42pm UTC](https://discourse.julialang.org/t/problem-in-cloning-or-adding-opencv-jl/9945/5 "2018-03-24T19:42:40Z")

</div>

That’s confusing: if you deleted all of `.julia` then you should not be seeing `OpenCV already exists`. Can you please post exactly what you did, starting from when you deleted `.julia` and what the error messages were?

Also, please see: [PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530)
