/usr/lib/libc.so.6: version `GLIBC_2.34' not found

Well, I don’t like this, I don’t like it at all, but since there was a permission denied error previously, try:

sudo pacman-key --init

Edit:

Followed by, if successful:

sudo pacman -S glibc lib32-glibc
sudo pacman-key --init
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
chmod: cannot access '/etc/pacman.d/gnupg//trustdb.gpg': No such file or directory
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
==> Generating pacman master key. This may take some time.
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
==> Updating trust database...
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
==> ERROR: Trust database could not be updated.
[stephen-x570gamingx logart]# ls -l /etc/pacman.d/gnupg/
total 8
-rw-r--r-- 1 root root  17 Mar  4 06:12 gpg-agent.conf
-rw-r--r-- 1 root root 105 Mar  4 06:12 gpg.conf
-rw-r--r-- 1 root root   0 Mar  4 06:12 pubring.gpg
-rw------- 1 root root   0 Mar  4 06:12 secring.gpg

:point_up_2:

No success. I see the /etc/pacman.d/gnupg/ folder is missing some content.

@logart Follow the steps in the given tutorial. Looks like you didn’t update your system in a long time. It’s not given there but I hope you know that you have to execute all the commands with sudo which are specified there.

Well, according to:

sudo pacman-key --init
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
chmod: cannot access '/etc/pacman.d/gnupg//trustdb.gpg': No such file or directory
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
==> Generating pacman master key. This may take some time.
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
==> Updating trust database...
gpg: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/libsqlite3.so.0)
==> ERROR: Trust database could not be updated.

sudo pacman -Syy gnupg archlinux-keyring manjaro-keyring
:: Synchronizing package databases...
 core                                                             169.1 KiB   355 KiB/s 00:00 [#######################################################] 100%
 extra                                                           1880.2 KiB   463 KiB/s 00:04 [#######################################################] 100%
 community                                                          6.9 MiB   628 KiB/s 00:11 [#######################################################] 100%
 multilib                                                         174.1 KiB   567 KiB/s 00:00 [#######################################################] 100%
warning: gnupg-2.2.32-2 is up to date -- reinstalling
warning: archlinux-keyring-20220224-1 is up to date -- reinstalling
warning: manjaro-keyring-20210910-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (3) archlinux-keyring-20220224-1  gnupg-2.2.32-2  manjaro-keyring-20210910-2

Total Download Size:    3.53 MiB
Total Installed Size:  11.57 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 gnupg-2.2.32-2-x86_64                                              2.4 MiB   806 KiB/s 00:03 [#######################################################] 100%
 archlinux-keyring-20220224-1-any                                1040.1 KiB  1238 KiB/s 00:01 [#######################################################] 100%
 manjaro-keyring-20210910-2-any                                   141.6 KiB   920 KiB/s 00:00 [#######################################################] 100%
 Total (3/3)                                                        3.5 MiB   851 KiB/s 00:04 [#######################################################] 100%
(3/3) checking keys in keyring                                                                [#######################################################] 100%
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
(3/3) checking package integrity                                                              [#######################################################] 100%
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
warning: Public keyring not found; have you run 'pacman-key --init'?
error: GPGME error: Invalid crypto engine
error: gnupg: missing required signature
:: File /var/cache/pacman/pkg/gnupg-2.2.32-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: archlinux-keyring: missing required signature
:: File /var/cache/pacman/pkg/archlinux-keyring-20220224-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: manjaro-keyring: missing required signature
:: File /var/cache/pacman/pkg/manjaro-keyring-20210910-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

Only other thing I can recommend, and I’m not even sure this’d work, is trying it from within a chroot environment. But somehow I don’t think it’d work…

I don’t have an idea further, as that file, libc.so.6 can’t be found, or something…

It is there, but linked to the wrong version.

ls -l /usr/lib/libc.so.6
lrwxrwxrwx 1 root root 12 May 12  2021 /usr/lib/libc.so.6 -> libc-2.33.so

Try:

sudo pacman-key --refresh-keys

See if that helps.

sudo pacman-key --verbose --refresh-keys                                                                                           ✔  3.0.0  
==> ERROR: You do not have sufficient permissions to read the pacman keyring.
==> Use 'pacman-key --init' to correct the keyring permissions.
    ~          
```                                               `

Okay so will not bother in this thread again but here you had to enter yes in all the steps.

OK, seeing as you cannot even do it with sudo, see if you can change to root and then do it:

Run,

su -

to change to root. If successful, run the following again:

sudo pacman-key --verbose --refresh-keys

Edit:

If you get an error again, still in the root environment, run:

pacman-key --init

And retry.

It shouldn’t be a link:

$ stat /usr/lib/libc.so.6

File: /usr/lib/libc.so.6
Size: 2463384         Blocks: 4816       IO Block: 4096   regular file
Device: 259,2   Inode: 1058029     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-03-03 08:52:13.524460922 +0200
Modify: 2022-02-11 18:08:58.000000000 +0200
Change: 2022-02-28 09:22:56.560158418 +0200
Birth: 2022-02-28 09:22:56.556825098 +0200

So you could always unlink it:

sudo unlink /usr/lib/libc.so.6

And re-sync:

sudo pacman -S

But note: I have no idea if this is a good idea or not, or if it will break your system…but there it is…I take no responsibility for the fallout if you decide to do it.

FWIW, I have been acting as root all morning. I went ahead and tried non-root with sudo, and also root with sudo, and root without sudo and they all behave identically.

I assume that file is in-use and will not allow me to unlink it.

Check if the file is actively in use:

lsof /usr/lib/libc.so.6

And close any open processes before trying to unlink?

Once again: I take no responsibility if that breaks your system. But, if it does, you sgould in theory be able to fix it from chroot.

PID 1 and a bunch of others have it open so that’s a no-go there.

What you could to is use the static compiled pacman: AUR (en) - pacman-static

Statically-compiled pacman (to fix or install systems without libc)

3 Likes