Could not fully load metadata for package pacman-6.0.1-3

I did a pamac upgrade on my laptop, something happened to the internet and the process error exited with a message about not being able to find libalpm.so

after rebooting I found out that this is somewhat connected to package manager like pamac or yay using pacman. I can’t finish pamac upgrade because it also wants libalpm.so. I can’t finish it with pacman -Syu because suddenly there is no pacman anymore, it says I can find it in core/pacman.

damn. after failing to install pacman the usual way, I finally downloaded the pacman-$VERSION.pkg.tar.zst and try to install it. ofc that doesnt work. so I extract it and copy manually to /, first trying to just copy to /usr/lib/libalpm.so.* and /usr/bin/pacman

pacman still wasn’t working, but I was able to install it via pikaur -U pacman-$version.pkg.tar.zst

now when I do pacman -Syu I get this:

└> sudo pacman -Syu
[sudo] password for joe:
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
error: failed retrieving file 'core.db' from mirror.alpix.eu : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from quantum-mirror.hu : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from mirror.cyberhost.uk : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from ftp.cc.uoc.gr : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from manjaro.mirrors.lavatech.top : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'core.db' from mirror.zetup.net : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'extra.db' from mirror.alpix.eu : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'extra.db' from quantum-mirror.hu : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'extra.db' from mirror.cyberhost.uk : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'extra.db' from ftp.cc.uoc.gr : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'extra.db' from manjaro.mirrors.lavatech.top : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'extra.db' from mirror.zetup.net : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
error: failed retrieving file 'community.db' from mirror.alpix.eu : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
warning: too many errors from mirror.alpix.eu, skipping for the remainder of this transaction
error: failed retrieving file 'community.db' from quantum-mirror.hu : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
warning: too many errors from quantum-mirror.hu, skipping for the remainder of this transaction
error: failed retrieving file 'community.db' from mirror.cyberhost.uk : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
warning: too many errors from mirror.cyberhost.uk, skipping for the remainder of this transaction
error: failed retrieving file 'community.db' from ftp.cc.uoc.gr : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
warning: too many errors from ftp.cc.uoc.gr, skipping for the remainder of this transaction
error: failed retrieving file 'community.db' from manjaro.mirrors.lavatech.top : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
warning: too many errors from manjaro.mirrors.lavatech.top, skipping for the remainder of this transaction
error: failed retrieving file 'community.db' from mirror.zetup.net : error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none
warning: too many errors from mirror.zetup.net, skipping for the remainder of this transaction
:: Starting full system upgrade...
resolving dependencies...
error: could not open file /var/lib/pacman/local/pacman-6.0.1-3/desc: No such file or directory
looking for conflicting packages...
warning: could not fully load metadata for package pacman-6.0.1-3
error: failed to prepare transaction (invalid or corrupted package)

is there anything else I can do?

when I try to do pamac reinstall pacman I get this:

Preparing...
Warning: pacman-6.0.1-3 is up to date -- reinstalling
Warning: manjaro-system-20220202-2 is up to date -- reinstalling
Resolving dependencies...
Checking inter-conflicts...
Warning: could not fully load metadata for package pacman-6.0.1-3
Error: Failed to prepare transaction: invalid or corrupted package

This seems to be the same then when I try this:

└> sudo pacman -S pacman
warning: pacman-6.0.1-3 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/pacman-6.0.1-3/desc: No such file or directory
warning: could not fully load metadata for package pacman-6.0.1-3
error: failed to prepare transaction (invalid or corrupted package)

Ps.: very good job on the forum software, my internet went out again and I closed the browser by accident, but it still saved my post! :smiley:

See:

thanks, that sadly didn’t work:

┌joe@chrbk ~/Downloads
└> /usr/bin/find /var/cache/pacman/pkg/ -iname "*.part" -exec sudo rm {} \;
┌joe@chrbk ~/Downloads
┌joe@chrbk ~/Downloads
└> /usr/bin/find /var/cache/pacman/pkg/p^C
┌joe@chrbk ~/Downloads
└> /usr/bin/find /var/cache/pacman/pkg/manjaro-system-20220202-2-any.pkg.tar.zst
/var/cache/pacman/pkg/manjaro-system-20220202-2-any.pkg.tar.zst
┌joe@chrbk ~/Downloads
🅽┌joe@chrbk ~/Downloads
└> sudo rm /var/cache/pacman/pkg/manjaro-system-20220202-2-any.pkg.tar.zst
[sudo] password for joe:
┌joe@chrbk ~/Downloads
└> pamac reinstall manjaro-system pacman
Preparing...
Warning: pacman-6.0.1-3 is up to date -- reinstalling
Warning: manjaro-system-20220202-2 is up to date -- reinstalling
Resolving dependencies...
Checking inter-conflicts...
Warning: could not fully load metadata for package pacman-6.0.1-3
Error: Failed to prepare transaction: invalid or corrupted package

It seems there was no “part” file to remove, because I didn’t get asked for my sudo password. I still removed manajaro-system package from this folder anyways.

Trying the third method also didn’t work, seems I’m missing a ssl cert file.
::WARNING https://bitbucket.org 'Could not find a suitable TLS CA certificate bundle, invalid path: /etc/ssl/certs/ca-certificates.crt'

Can you try with sudo pacman -S --overwrite pacman?

Also see https://wiki.archlinux.org/title/Pacman#Manually_reinstalling_pacman

thanks for the suggestion. --overwrite throws the same error:

└> sudo pacman -S pacman --overwrite \*
warning: pacman-6.0.1-3 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/pacman-6.0.1-3/desc: No such file or directory
warning: could not fully load metadata for package pacman-6.0.1-3
error: failed to prepare transaction (invalid or corrupted package)

I’m now trying to compile pacman-static from the wiki link on another machine (because I also can’t use makepkg on the broken one). then try to copy it over.

otherwise I’m trying to boot to live iso and try to fix it via chroot or similar