Question about pacman error message

I’m hoping this awesome forum can help because I’m really freaking out right now. I tried to update with pacman in the terminal like I always do and I get this error message:

:: Starting full system upgrade…
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format
error: failed to prepare transaction (invalid or corrupted database)

Can someone please point me in the right direction to fix this.

Try:
sudo rm -R /var/lib/pacman/sync/
and
sudo pacman -Syyu

HTH

1 Like

possible mirror or repo

1 Like

Thanks for the suggestion but it comes back with:

rm: cannot remove ‘/var/lib/pacman/sync/’: No such file or directory

Could this possibly be related to a new install of plasma?

I’ve never had anything remotely like this in years of using Xfce.

That is a problem. Try:

sudo mkdir -p /var/lib/pacman/sync
sudo pacman -Syyu

No, this has nothing to do with your DE.

2 Likes

–deleted by author–
:blush:

I pasted both of those sudo commands and the end result is the same. This is perplexing because I haven’t done anything weird or exotic on this machine, it’s my daily driver.

Can we see:
text lsblk -o name,type,fstype,size,mountpoint

1 Like
NAME                                          TYPE  FSTYPE       SIZE MOUNTPOINT
sda                                           disk               1.8T 
├─sda1                                        part  vfat         300M /boot/efi
├─sda2                                        part  crypto_LUKS  1.8T 
│ └─luks-3e62ed5d-f68c-4093-9416-a822046f5acf crypt ext4         1.8T /
└─sda3                                        part  crypto_LUKS 16.9G 
  └─luks-3fc68538-c344-4680-8c91-5aecc76a15d5 crypt swap        16.9G [SWAP]
sdb                                           disk                 0B 

I recently encountered a very similar issue (Pacman database files replaced with html files)

Although for me, /var/lib/pacman/sync existed and had its files, but they were for some reason replaced with html files for a website I have never visited, or even known of.
I have tried removing them and attempting pacman -Syyu and yay again, but with the same result.
If anyone could assist me with this that would be great.

is mirror, not pacman:

curl -IL http://mirrors.evowise.com/archlinux/core/os/x86_64/core.db
HTTP/1.1 301 Moved Permanently
Location: https://www.zerobounce.net
3 Likes

Thanks, I generated a new mirrorlist, omitting evowise, cleared the /var/lib/pacman/sync directory, and I was able to use pacman just fine.

Welcome,

Apparently youwrite as well :wink:

Welcome to EnOS’ forum!

happy u fix

@ireadonly welcome