Can't update, "error: failed to synchronize all databases"

So despite my lack of expertise, EndeavourOS has been the most reliable for me. After making use of pamac so I could have clamav up & running I have had ZERO signifcant problems until a major kernal update. My PC had a fit on shutdown but restarted ok, but I’m not sure if that will be included in the logs below. The failure to update persists however.

I would help updating my system please.

My system specs:
B550 Tomahawk MAX
G.Skill Trident Z Neo 16GB (2x8GB) 3600MHz CL16 DDR4 (have not gotten around to overclocking)
AMD 3600
Kingston A2000 M.2 NVMe SSD 1TB
Western Digital 6tb HDD
MSI GeForce GTX 1660 Ti Ventus XS 6G OC

Hardware Log
inxi -Fxxc0z --no-host | eos-sendlog
Hardware https://clbin.com/Jj93h

Cooling includes 4x140mm case fans & Noctua NH-D15S Multi Socket CPU Cooler

Latest log of update attempt:

Arch & EndeavourOS update check:
:: Searching Arch & EndeavourOS for updates…
curl 7.81.0-1 → 7.81.0-2
elfutils 0.186-2 → 0.186-3
eos-apps-info 1.2.2-1 → 1.2.3-1
eos-rankmirrors 2.2.1-2 → 2.2.1-4
imagemagick 7.1.0.21-1 → 7.1.0.22-1
imagemagick-doc 7.1.0.21-1 → 7.1.0.22-1
ldb 2:2.4.1-4 → 2:2.4.2-1
libelf 0.186-2 → 0.186-3
libraqm 0.8.0-1 → 0.9.0-1
linux 5.16.3.arch1-1 → 5.16.4.arch1-1
linux-headers 5.16.3.arch1-1 → 5.16.4.arch1-1
qt5-base 5.15.2+kde+r295-2 → 5.15.2+kde+r296-1
qt5-graphicaleffects 5.15.2-1 → 5.15.2-2
qt5-multimedia 5.15.2-1 → 5.15.2-2
qt5-quickcontrols 5.15.2-1 → 5.15.2-2
qt5-quickcontrols2 5.15.2+kde+r10-1 → 5.15.2+kde+r11-1
qt5-speech 5.15.2-1 → 5.15.2-2
qt5-svg 5.15.2+kde+r16-1 → 5.15.2+kde+r16-2
qt5-wayland 5.15.2+kde+r46-1 → 5.15.2+kde+r46-2
qt5-webengine 5.15.8-1 → 5.15.8-5
qt5-x11extras 5.15.2-1 → 5.15.2-2
smbclient 4.15.4-1 → 4.15.4-2
systemd 250.3-1 → 250.3-2
systemd-libs 250.3-1 → 250.3-2
systemd-sysvcompat 250.3-1 → 250.3-2
tdb 1.4.5-3 → 1.4.6-1
virtualbox-host-modules-arch 6.1.32-3 → 6.1.32-4
welcome 3.17.10-1 → 3.17.11-2
xterm 370-1 → 370-2
Root Password:
:: Synchronizing package databases…
error: failed to synchronize all databases (unable to lock database)

AUR update check:
:: Searching AUR for updates…
there is nothing to do

Press ENTER to close this window:

Boot log journalctl -b -0 | eos-sendlog
https://clbin.com/jbyl6

Journal Log

journalctl -b -0 > /tmp/journal

journalctl -b -1 > /tmp/journal.last

journalctl -b -2 > /tmp/journal.2last
journalctl -b -0

| curl -F ‘f:1=<-’ ix.io
https://clbin.com/exRii

https://wiki.archlinux.org/title/Pacman#"Failed_to_init_transaction_(unable_to_lock_database)"_error

Thanks pebcak, checking it out now.

1 Like

I’m thinking I should delete:

:: Proceed with installation? [Y/n] Y
:: Retrieving packages…
xterm-370-2-x86_64 426.7 KiB 178 KiB/s 00:02 [------------------------------------] 100%
qt5-webengine-5.15.8-5-x86_64 48.5 MiB 2.63 MiB/s 00:18 [------------------------------------] 100%
linux-5.16.4.arch1-1-x86_64 96.5 MiB 2022 KiB/s 00:49 [------------------------------------] 100%
Total (3/3) 145.4 MiB 2.96 MiB/s 00:49 [------------------------------------] 100%
(29/29) checking keys in keyring [------------------------------------] 100%
(29/29) checking package integrity [------------------------------------] 100%
error: systemd-libs: signature from “Christian Hesse eworm@archlinux.org” is invalid
:: File /var/cache/pacman/pkg/systemd-libs-250.3-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]

The following has me thinking I’m meant to “configure pacman-key” as per : https://wiki.archlinux.org/title/Pacman/Package_signing

Specifically the stuff around:
rm /var/cache/pacman/pkg/pkgname
rm /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux

I read up on system time earlier & checked a few days ago.

First try to update/refresh your mirrors from the Welcome app. When it is done, open a terminal and run:

sudo pacman -Syy archlinux-keyring endeavouros-keyring

Then

sudo pacman -Su

Ta,

warning: archlinux-keyring-20220125-1 is up to date -- reinstalling
warning: endeavouros-keyring-1-5 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

..

:: Processing package changes...
(1/2) reinstalling archlinux-keyring                               [------------------------------------] 100%
==> Appending keys from archlinux.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2022-05-06
==> Updating trust database...
gpg: next trustdb check due at 2022-05-06
(2/2) reinstalling endeavouros-keyring                             [------------------------------------] 100%
==> Updating trust database...
gpg: next trustdb check due at 2022-05-06
  -> Locally signed 1 keys.
==> Updating trust database...
gpg: next trustdb check due at 2022-05-06
==> Appending keys from archlinux.gpg...
==> Appending keys from endeavouros.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2022-05-06
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
[wilbur@wilbur-ms7c91 ~]$ sudo pacman -Su
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Package (29)                            Old Version        New Version        Net Change

core/curl                               7.81.0-1           7.81.0-2             0.00 MiB
core/elfutils                           0.186-2            0.186-3              0.00 MiB
endeavouros/eos-apps-info               1.2.2-1            1.2.3-1              0.00 MiB
endeavouros/eos-rankmirrors             2.2.1-2            2.2.1-4              0.00 MiB
extra/imagemagick                       7.1.0.21-1         7.1.0.22-1           0.00 MiB
extra/imagemagick-doc                   7.1.0.21-1         7.1.0.22-1           0.00 MiB
extra/ldb                               2:2.4.1-4          2:2.4.2-1            0.00 MiB
core/libelf                             0.186-2            0.186-3              0.00 MiB
extra/libraqm                           0.8.0-1            0.9.0-1              0.01 MiB
core/linux                              5.16.3.arch1-1     5.16.4.arch1-1      -0.01 MiB
core/linux-headers                      5.16.3.arch1-1     5.16.4.arch1-1       0.00 MiB
extra/qt5-base                          5.15.2+kde+r295-2  5.15.2+kde+r296-1    0.00 MiB
extra/qt5-graphicaleffects              5.15.2-1           5.15.2-2             0.00 MiB
extra/qt5-multimedia                    5.15.2-1           5.15.2-2            -0.08 MiB
extra/qt5-quickcontrols                 5.15.2-1           5.15.2-2            -0.03 MiB
extra/qt5-quickcontrols2                5.15.2+kde+r10-1   5.15.2+kde+r11-1     0.00 MiB
extra/qt5-speech                        5.15.2-1           5.15.2-2             0.00 MiB
extra/qt5-svg                           5.15.2+kde+r16-1   5.15.2+kde+r16-2     0.00 MiB
extra/qt5-wayland                       5.15.2+kde+r46-1   5.15.2+kde+r46-2     0.00 MiB
extra/qt5-webengine                     5.15.8-1           5.15.8-5             0.12 MiB
extra/qt5-x11extras                     5.15.2-1           5.15.2-2             0.00 MiB
extra/smbclient                         4.15.4-1           4.15.4-2             0.00 MiB
core/systemd                            250.3-1            250.3-2              0.01 MiB
core/systemd-libs                       250.3-1            250.3-2              0.00 MiB
core/systemd-sysvcompat                 250.3-1            250.3-2              0.00 MiB
extra/tdb                               1.4.5-3            1.4.6-1              0.00 MiB
community/virtualbox-host-modules-arch  6.1.32-3           6.1.32-4             0.00 MiB
endeavouros/welcome                     3.17.10-1          3.17.11-2            0.00 MiB
extra/xterm                             370-1              370-2               -0.02 MiB

Total Installed Size:  630.83 MiB
Net Upgrade Size:        0.03 MiB

:: Proceed with installation? [Y/n] Y
(29/29) checking keys in keyring                                   [------------------------------------] 100%
(29/29) checking package integrity                                 [------------------------------------] 100%
**error: systemd-libs: signature from "Christian Hesse <eworm@archlinux.org>" is invalid**
**:: File /var/cache/pacman/pkg/systemd-libs-250.3-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).**
Do you want to delete it? [Y/n] 

I have yet to do “configure pacman-key” & I’m reading up on that. From what I can gather, communication with repositories is more than just a package signing, but needing local keys on my machine.

1 Like

Try reinstalling your Arch keyring.

sudo pacman -S archlinux-keyring

Also, use three (```) to mark your terminal outputs (3 at the beginning and 3 at the end of the code output) it’s very hard to read when just pasted in as normal text.

They did already :slightly_smiling_face:

This is eworm’s key that I have got in my pacman-key:

pub   rsa2048 2011-08-12 [SC]
      02FD1C7A934E614545849F19A6234074498E9CEE
uid           [  full  ] Christian Hesse <eworm@archlinux.org>
uid           [  full  ] Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>

You could try the following:

sudo pacman-key --recv-keys  02FD1C7A934E614545849F19A6234074498E9CEE

sudo pacman-key --finger  02FD1C7A934E614545849F19A6234074498E9CEE

sudo pacman-key --lsign-key  02FD1C7A934E614545849F19A6234074498E9CEE

Edited to correct some “typos” :blush:

Everything is resolved, however I have a short term memory. How would I bring up a log of what I did that fixed it in terms of commands I did? On the upside, I’m looking closer at the stuff on the EndeavorOS wiki & facepalming at all the stuff I missed & that we kinda covered in the thread.

Going to look at the wiki RE: Logs too. :innocent:

You have a history of the commands you have run (500 by default) in the file .bash_history in yor home directory.

Also, if your issue is resolved to your satisfaction, please mark the post that pointed you to the solution (if there is one in the thread) , click … and check the box.

And, welcome to EnOS’ forum!

:enos_flag:

Try the command history should show a list of commands you used.

➜ history
 2924  exit
 2925  nmcli d disconnect enp0s31f6
 2926  exit
 2927  sudo shutdown now
 2928  pkill picom
 2929  picom -b -f --config ~/.config/picom/picom.conf --experimental-backends
 2930  yay -Syu --noconfirm && exit
 2931  nmcli d disconnect enp0s31f6
 2932  exit
 2933  nmcli d disconnect enp0s31f6
 2934  exit
 2935  ifconfig
 2936  lshw -C network
 2937  ip link
 2938  ip a
 2939  ip link

My history, I think it’s somewhere in this & I’m consulting relevant wiki to relate output to action:

31 sudo rm /var/lib/pacman/db.lck
32 sudo pacman -Syy archlinux-keyring endeavouros-keyring
33 sudo pacman -Su
34 cd Downloads
35 ls
36 sudo pacman -U archlinux-keyring
37 cd Downloads
38 ls
39 sudo pacman -U archlinux-keyring-20220125-1-any.pkg.tar.zst
40 sudo pacman-key --init
41 sudo pacman-key --populate archlinux endeavoros
42 sudo pacman -Syy archlinux-keyring endeavouros-keyring
43 sudo pacman -Su

Ah - pebcak covered that it worked first time. Thankyou all for you help but also steering me at the online resources.

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