Yay: git error: fatal: not a git repository (or any of the parent directories): .git

I am encountering this issue when installing or updating existing packages with yay:

Installing or updating packages:

 -> error resetting <package-name>: fatal: not a git repository (or any of the parent directories): .git

Fixes tried:

Notes:

  • I had some issue with python packages (pip), maybe there is a dependency there which is required.
  • pacman still works.

Care to explain?

Also post

ldd /usr/bin/yay
ldd /usr/bin/git
find /usr/lib/python3.10 | LC_ALL=C pacman -Qqo - 2>&1 >&- >/dev/null | cut -d ' ' -f 5-

Care to explain?

Installed some packages through various means (poetry/pip), I actually can’t remember - but it led to conflicts, so I removed and backed up my python packages and reinstalled dependency packages as necessary through pacman/yay.

Diagnostics:

    ~  ldd /usr/bin/yay                                                                                                                            ✔ 
        linux-vdso.so.1 (0x00007ffc61fb5000)
        libalpm.so.13 => /usr/lib/libalpm.so.13 (0x00007f78af1cf000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f78ae819000)
        libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007f78ae200000)
        libarchive.so.13 => /usr/lib/libarchive.so.13 (0x00007f78ae752000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007f78ae6aa000)
        libgpgme.so.11 => /usr/lib/libgpgme.so.11 (0x00007f78af17d000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f78af243000)
        libacl.so.1 => /usr/lib/libacl.so.1 (0x00007f78af171000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f78af146000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f78ae680000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f78ae157000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f78ae65e000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f78ae64b000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f78ae13d000)
        libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x00007f78ae111000)
        libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007f78ae0ef000)
        libssh2.so.1 => /usr/lib/libssh2.so.1 (0x00007f78ae0ad000)
        libpsl.so.5 => /usr/lib/libpsl.so.5 (0x00007f78ae099000)
        libssl.so.3 => /usr/lib/libssl.so.3 (0x00007f78adff9000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f78adfa3000)
        libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f78adf95000)
        libassuan.so.0 => /usr/lib/libassuan.so.0 (0x00007f78adf80000)
        libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f78adf5a000)
        libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007f78adda0000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f78adcc6000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f78adc98000)
        libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f78adc92000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f78adc84000)
        libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0x00007f78adc7d000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f78adc6b000)
        libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f78adc46000)
    ~  ldd /usr/bin/git                                                                                                                            ✔ 
        linux-vdso.so.1 (0x00007fff3a1a1000)
        libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f01aa6c9000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f01aa6af000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f01aa019000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f01aa79b000)
    ~  find /usr/lib/python3.10 | LC_ALL=C pacman -Qqo - 2>&1 >&- >/dev/null | cut -d ' ' -f 5-                                                    ✔ 
    ~                                                                                                                                              ✔

Moderator edit: split command output

An alternative to that can be done with lostfiles:

sudo lostfiles | grep /usr/lib/python3.10/site-packages/
1 Like

Everything looks fine.

Try cleanbuilding them - answer [A]ll when you’re asked.

1 Like

I removed these packages manually, I have a backup:

   ~  sudo lostfiles | grep /usr/lib/python3.10/site-packages/                                                                                    ✔ 
    ~    

Everything looks fine.
Try cleanbuilding them - answer [A]ll when you’re asked.

Nice - thank you both,
yay -Syu --cleanmenu
and selecting All solved it.

Now:

    ~  yay -Syu --cleanmenu                                                                                                             ✔  8m 59s  
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
 -> python-frida: local (16.0.7-1) is newer than AUR (16.0.6-1)
 -> Missing AUR Packages:  etcher  manjaro-documentation-en  manjaro-firmware
 -> Orphaned AUR Packages:  electron12
 -> Flagged Out Of Date AUR Packages:  electron12

All solved, but curious about the missing packages, particularly manjaro-firmware.

Those are packages you have installed that don’t exist anywhere anymore. So if you don’t specifically know that you need them, you don’t. :stuck_out_tongue:

1 Like

Those packages were dropped from the Manjaro repos. You can safely remove them.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.