ERROR: LoadError: ArgumentError: Package LibGit2 does not have LibGit2_jll in its dependencies

Since a number of weeks I can no longer initiate Pkg mode in Julia-1.11-DEV… .

Any hints on how to work around that?

Thanks!

In my .julia/environments/Manifest.toml the entry for LibGIT2 is:

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

This is my versioning.

julia> versioninfo()
Julia Version 1.11.0-DEV.633
Commit abf5d9e806 (2023-10-11 12:41 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin23.1.0)
  CPU: 8 × Apple M2
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 11 on 4 virtual cores
Environment:
  JULIA_NUM_THREADS = 8
  JULIA_EDITOR = subl
  JULIA_SVG_BROWSER = Google Chrome.app
  JULIA_SPECIALFUNCTIONS_BUILD_SOURCE = true
  JULIA_MPI_PATH = /usr/local/Cellar/open-mpi/4.0.2
  JULIA_PKG3_PRECOMPILE = true
  JULIA_PKG_SERVER = pkg.julialang.org
  JULIA_SR_HOME = /Users/rob/.julia/dev/StatisticalRethinking/src
  JULIA_ROS_HOME = /Users/rob/Projects/R/ROS-Examples
  JULIA_MIXTAPE_HOME = /Users/rob/Projects/R/mixtape
  JULIA_WOOLDRIDGE_HOME = /Users/rob/Projects/R/wooldridge

The full error output is shown below:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-DEV.633 (2023-10-11)
 _/ |\__'_|_|_|\__'_|  |  Commit abf5d9e806 (0 days old master)
|__/                   |

julia> 2*4 # Simple test if Julia-1.11 works at all.
8

julia> ]
julia> ┌ Info: Precompiling Pkg [44cfe95a-1eb2-52ea-b672-e2afdf69b78f]
└ @ Base loading.jl:2433
ERROR: LoadError: ArgumentError: Package LibGit2 does not have LibGit2_jll in its dependencies:
- Note that the following manifests in the load path were resolved a potentially
  different DEV version of the current version, which may be the cause
  of the error:
    /Users/rob/.julia/environments/v1.11/Manifest.toml
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have LibGit2 checked out for development and have
  added LibGit2_jll as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with LibGit2
Stacktrace:
 [1] macro expansion
   @ Base ./loading.jl:1778 [inlined]
 [2] macro expansion
   @ Base ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1754
 [4] #invoke_in_world#3
   @ Base ./essentials.jl:933 [inlined]
 [5] invoke_in_world
   @ Base ./essentials.jl:930 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1747
 [7] include
   @ Base ./Base.jl:497 [inlined]
 [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base ./loading.jl:2302
 [9] top-level scope
   @ stdin:3
in expression starting at /Users/rob/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/LibGit2/src/LibGit2.jl:3
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile LibGit2 [76f85450-5226-5b5a-8eaa-529ad045b433] to "/Users/rob/.julia/compiled/v1.11/LibGit2/jl_51CnUn".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2554
  [3] compilecache
    @ Base ./loading.jl:2420 [inlined]
  [4] (::Base.var"#998#999"{Base.PkgId})()
    @ Base ./loading.jl:2022
  [5] mkpidlock(f::Base.var"#998#999"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:93
  [6] #mkpidlock#6
    @ FileWatching.Pidfile ~/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:88 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:111
  [8] #invokelatest#2
    @ Base ./essentials.jl:901 [inlined]
  [9] invokelatest
    @ Base ./essentials.jl:896 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#998#999"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3066
 [11] maybe_cachefile_lock
    @ Base ./loading.jl:3063 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2018
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1863
 [14] #invoke_in_world#3
    @ Base ./essentials.jl:933 [inlined]
 [15] invoke_in_world
    @ Base ./essentials.jl:930 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1854
 [17] macro expansion
    @ Base ./loading.jl:1792 [inlined]
 [18] macro expansion
    @ Base ./lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1754
 [20] #invoke_in_world#3
    @ Base ./essentials.jl:933 [inlined]
 [21] invoke_in_world
    @ Base ./essentials.jl:930 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
 [23] include(mod::Module, _path::String)
    @ Base ./Base.jl:497
 [24] include(x::String)
    @ Pkg ~/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/Pkg/src/Pkg.jl:3
 [25] top-level scope
    @ ~/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/Pkg/src/Pkg.jl:59
 [26] include
    @ Base ./Base.jl:497 [inlined]
 [27] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2302
 [28] top-level scope
    @ stdin:3
in expression starting at /Users/rob/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/Pkg/src/GitTools.jl:3
in expression starting at /Users/rob/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/Pkg/src/Pkg.jl:3
in expression starting at stdin:3
┌ Error: Error in the keymap
│   exception = (ErrorException("Failed to precompile Pkg [44cfe95a-1eb2-52ea-b672-e2afdf69b78f] to \"/Users/rob/.julia/compiled/v1.11/Pkg/jl_zXMRuQ\"."), Union{Ptr{Nothing}, Base.InterpreterIP}[Ptr{Nothing} @0x00000001215e3eb3, Ptr{Nothing} @0x00000001213f18e7, Ptr{Nothing} @0x00000001213f1c0f, Ptr{Nothing} @0x00000001053a00f7, Ptr{Nothing} @0x00000001053a01cf, Ptr{Nothing} @0x000000010566933b, Ptr{Nothing} @0x00000001050640fb, Ptr{Nothing} @0x000000010513c04f, Ptr{Nothing} @0x000000010513c09f, Ptr{Nothing} @0x000000010566933b, Ptr{Nothing} @0x000000010567772f, Ptr{Nothing} @0x0000000104f4018f, Ptr{Nothing} @0x000000010566933b, Ptr{Nothing} @0x000000010567772f, Ptr{Nothing} @0x0000000104f38113, Ptr{Nothing} @0x000000010566933b, Ptr{Nothing} @0x0000000105677e83, Ptr{Nothing} @0x00000001213f1edf, Ptr{Nothing} @0x0000000121396f67, Ptr{Nothing} @0x0000000121667aab, Ptr{Nothing} @0x0000000121398c6b, Ptr{Nothing} @0x00000001056693c3, Ptr{Nothing} @0x0000000105677f13, Ptr{Nothing} @0x00000001215d62bb, Ptr{Nothing} @0x0000000172520c13, Ptr{Nothing} @0x00000001056693c3, Ptr{Nothing} @0x0000000105677e83, Ptr{Nothing} @0x00000001725f7c4b, Ptr{Nothing} @0x00000001725f7cbf, Ptr{Nothing} @0x00000001056693c3, Ptr{Nothing} @0x00000001725695bb, Ptr{Nothing} @0x000000017256a617, Ptr{Nothing} @0x000000017256a7e3, Ptr{Nothing} @0x00000001056693c3, Ptr{Nothing} @0x00000001726482a7, Ptr{Nothing} @0x00000001725673bb, Ptr{Nothing} @0x00000001725673ef, Ptr{Nothing} @0x00000001056693c3, Ptr{Nothing} @0x000000010568951b])
└ @ REPL.LineEdit /Users/rob/Projects/Julia/julia/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2809
julia>

You can:

  • delete the manifest, load Pkg and do e.g. a resolve to regenerate the manifest. Doing this might get you different versions than what you had before though.
  • Start julia with JULIA_LOAD_PATH="@stdlib" julia, load Pkg then do pkg> activate @v1.11 and pkg> resolve to update the manifest.

This should be improved somehow in the future.

Thank you Kristoffer, I took the 2nd route and it worked flawlessly!!!