Problem to install packages

Dear all,
I just to install Julia in a new computer.
When I run Pkg.add("JuMP") a error message appears:

  Updating registry at `C:\Users\Usuário\.juliapro\JuliaPro_v1.0.4.1\registries\JuliaPro`
  Updating git-repo `https://pkg.juliacomputing.com//registry/JuliaPro`
ERROR: GitError(Code:EMERGECONFLICT, Class:Checkout, 1659 conflicts prevent checkout)
Stacktrace:
 [1] macro expansion at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\LibGit2\src\error.jl:101 [inlined]
 [2] #checkout_tree#46(::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo, ::LibGit2.GitCommit) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\LibGit2\src\repository.jl:358
 [3] checkout_tree at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\LibGit2\src\repository.jl:356 [inlined]
 [4] ffmerge!(::LibGit2.GitRepo, ::LibGit2.GitAnnotated) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\LibGit2\src\merge.jl:107
 [5] #merge!#89(::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo, ::Array{LibGit2.GitAnnotated,1}, ::Bool) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\LibGit2\src\merge.jl:234
 [6] #merge! at .\none:0 [inlined]
 [7] #merge!#140(::String, ::String, ::Bool, ::LibGit2.MergeOptions, ::LibGit2.CheckoutOptions, ::Function, ::LibGit2.GitRepo) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\LibGit2\src\LibGit2.jl:784
 [8] #merge! at .\none:0 [inlined]
 [9] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\Types.jl:1254
 [10] update_registries at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\Types.jl:1219 [inlined]
 [11] #handle_repos_add!#61(::Bool, ::Nothing, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\Types.jl:719
 [12] #handle_repos_add! at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:0 [inlined]
 [13] #add_or_develop#17(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:47
 [14] #add_or_develop at .\none:0 [inlined]
 [15] #add_or_develop#16 at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:36 [inlined]
 [16] #add_or_develop at .\none:0 [inlined]
 [17] #add_or_develop#13 at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:34 [inlined]
 [18] #add_or_develop at .\none:0 [inlined]
 [19] #add_or_develop#12 at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:33 [inlined]
 [20] #add_or_develop at .\none:0 [inlined]
 [21] #add#22 at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:64 [inlined]
 [22] add(::String) at C:\Users\julia\AppData\Local\Julia-1.0.4\share\julia\stdlib\v1.0\Pkg\src\API.jl:64
 [23] top-level scope at none:0

Anyone can help me please?

I don’t know the solution but does this happen with any package you try to install, or just Jump? I have a vague recollection about git doing weird things on Windows, but I don’t remember if there’s a solution.

I googled “juliapro windows GitError(EMERGECONFLICT” and found this, maybe give that a try?

3 Likes

Dear friend,
Happens with any package.
In this computer, I optimized some resourses in the windows.
Would be this?

Could be. I don’t know enough about windows to know for sure, but deleting that directory shouldn’t be a problem. I’d give it a try and report back.

This is a bug in the version of JuliaPro you’re running.

There are two ways to fix this:
a) Upgrade to JuliaPro 1.0.5.2.
b) If you want to stay on the same version, go to C:\Users\Usuário\.juliapro\JuliaPro_v1.0.4.1\registries\JuliaPro and run

git config core.fileMode false

if you have git installed. otherwise you’ll need to edit C:\Users\Usuário\.juliapro\JuliaPro_v1.0.4.1\registries\JuliaPro\.git\config and add or change the filemode flag to false. The file should contain

[core]
	filemode = false

afterwards.

1 Like