Can not add new packages on Manjaro Linux

I just installed Julia 1.4 from the Manjaro Linux repository. When I try to add new packages to Julia, I get an error message:

(@v1.4) pkg> add Plots
    Cloning default registries into `~/.julia`
    Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:Invalid, invalid version 0 on git_proxy_options)      

Can anyone help with this please?

1 Like

It looks like there is a problem with the Manjaro Julia package…you will need to use the official binaries:

2 Likes

I think it is the same problem.

I had a problem a while back in Manjaro because I installed Julia from the AUR. I just removed everything, downloaded the original binaries and it works.

1 Like

I had this problem in Arch. Solved by adding export JULIA_PKG_SERVER=pkg.julialang.org to my .zshrc file (you might have to add it to your .bashrc file, depending on which shell you use).

3 Likes

Thank you! That solved the problem for me!

I am getting a similar, but slightly different error (on Manjaro as well):

 julia> versioninfo()
Julia Version 1.4.0
Commit b8e9a9ecc6 (2020-03-21 16:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
  JULIA_PKG_SERVER = pkg.julialang.org
  JULIA_NUM_THREADS = 2

(@v1.4) pkg> up
   Updating registry at `~/.julia/registries/General`
ERROR: GitError(Code:ENOTFOUND, Class:Odb, object not found - no match for id (77ebcf65f902e1d597f08e94c20efaa3c1a30033))
Stacktrace:
 [1] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/error.jl:101 [inlined]
 [2] LibGit2.GitTree(::LibGit2.GitRepo, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/repository.jl:142
 [3] isdiff(::LibGit2.GitRepo, ::String, ::String; cached::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/LibGit2.jl:155
 [4] #isdirty#112 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/LibGit2.jl:132 [inlined]
 [5] isdirty at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LibGit2/src/LibGit2.jl:132 [inlined] (repeats 2 times)
 [6] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}; force::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:1073
 [7] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:207
 [8] up at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:201 [inlined]
 [9] #up#47 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:196 [inlined]
 [10] up(::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:196
 [11] do_cmd!(::Pkg.REPLMode.Command, ::REPL.LineEditREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:403
 [12] do_cmd(::REPL.LineEditREPL, ::String; do_rethrow::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:381
 [13] do_cmd at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:376 [inlined]
 [14] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/REPLMode/REPLMode.jl:542
 [15] #invokelatest#1 at ./essentials.jl:712 [inlined]
 [16] invokelatest at ./essentials.jl:711 [inlined]
 [17] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/LineEdit.jl:2354
 [18] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:1055
 [19] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:206
 [20] (::Base.var"#764#766"{Bool,Bool,Bool,Bool})(::Module) at ./client.jl:383
 [21] #invokelatest#1 at ./essentials.jl:712 [inlined]
 [22] invokelatest at ./essentials.jl:711 [inlined]
 [23] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:367
 [24] exec_options(::Base.JLOptions) at ./client.jl:305
 [25] _start() at ./client.jl:484

I already changed the JULIA_PKG_SERVER as described here. I’m using the official binaries. Is this a known problem or should I open an issue?

Possibly. But maybe first try

using Pkg

Pkg.update()

to see whether you get the same error.

That shouldn’t make any difference, it ends up calling exactly the same internals. My problem was that my clone of General somehow got corrupted, so I had to delete ~/.julia/registries/General and get a fresh master from https://github.com/JuliaRegistries/General. Packages I manually added by url were also corrupted, here I did a grep -r <UUID>, deleted all occurrences in ~/.julia/environments/v1.4/Manifest.toml and -Project.toml manually and the corresponding folder in ~/.julia/clones. I believe this was because my computer shut down involuntarily and I still had an open julia session.