Error: "/usr/lib/libgpgme.so.11: file too short" when trying to use Pacman

Hi all,

This morning my system shut down while it was updating, at this point this doesn’t happen to me very often, and when it does there’s usually a fix that I can figure out with some work (rebuilding things using arch-chroot), but this time I’m stumped. I logged back in and everything looked fine until I got to my login screen, everything was there as usual but all the characters were rectangles (something like “▯▯▯▯▯”) I tried to enter my password as usual, but when I pressed enter “Notify on reboot about special conditions” appeared for a second, and then it sent me right back to the login screen. Another time (after I did mkinitcpio while in chroot) it just got to “Starting accounts service” and then also sent me right back to the login screen.

At first I tried to arch-chroot using a live usb, and I discovered that I couldn’t do any of the typical things other than mkinitcpio because every single pacman command I try shows the above error. None of these commands work for that reason:

https://wiki.archlinux.org/title/Pacman#pacman_crashes_during_an_upgrade

Reading up on past threads, I read one about a similar issue which mentioned using pacman-static to reinstall pacman and that you can’t do this through arch-chroot as you can’t pkgbuild in root.

So I went back to my actual Linux install, entered the terminal from my login screen (as I still can’t log in), Everything showed up fine, I was able to log into my account (in the terminal), so I tried to git clone pacman-static. Problem now is that I can’t do this because I’m unable to connect to my Wi-Fi, I’ve tried iwctl but it doesn’t show any available networks to connect to. My Wi-Fi in the house works fine otherwise, so I’m guessing that the botched system update broke that too.

So to summarise, I think my pacman broke and that I have to fix it using pacman-static, but I cannot do this as it’s possible my connectivity services broke too, and something about how characters are read broke too.

Here’s the output of df -H, an example of what happens when I run any pacman command, and also the output of two commands that were requested of the other person in the previous thread. Thank you for taking the time to read my post.

I think you have misunderstood the linked Archwiki instructions. You do NOT CHROOT to your broken system. You only mount what is pointed out, and then run a pacman command using --sysroot /<mount_point>. This functionallity is especially created for such cases.

Try that, and report any messages, or other failure.

2 Likes

Thank you, those instructions are very clear, my mistake. I was able to update my system now, at the end of every update it had a few lines of “pacman: error while loading shared libraries: /usr/lib/libgpgme.so.11: file too short” but they went through anyway.

(There were a few of these that I had to do but no problems) [FAQ] Package installation says FILENAME exists in filesystem; “Failed to commit transaction (conflicting files)”

Unfortunately, after booting back into my actual system, it still showed missing characters (“▯▯▯▯▯s") like before, and after I put in my password it still doesn’t go past “Starting accounts service”. Now when I go back into my live USB and try to mount those filesystems and run pacman --sysroot /mnt -Syu again , I get a whole lot of these messages even though I’m connected to wifi.

Hi, strangely enough I was able to get in by selecting a different desktop environment from XFCE. All my personal files are here but some programs like XFCE Terminal don’t open.
Anyhow, I am now trying to makepkg pacman-static, and I get this error. I also had to do makepkg --skippgpcheck because I was getting “ERROR: One or more PGP signatures could not be verified!”
I can provide more of the command if needed but this is the end of it where the error shows up:

make depend && make _build_libs make[1]: Entering directory '/home/name/Documents/pacman-static/src/openssl-3.1.4' make[1]: Leaving directory '/home/name/Documents/pacman-static/src/openssl-3.1.4' make[1]: Entering directory '/home/name/Documents/pacman-static/src/openssl-3.1.4' musl-gcc -I. -Iinclude -Iapps/include -pthread -m64 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -D_LARGEFILE64_SOURCE -Wa,--noexecstack -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -D_LARGEFILE64_SOURCE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -static -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/home/name/Documents/pacman-static/src/temp/usr/lib/engines-3\"" -DMODULESDIR="\"/home/name/Documents/pacman-static/src/temp/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -c -o apps/lib/libapps-lib-app_libctx.o apps/lib/app_libctx.c /bin/sh: line 1: musl-gcc: command not found make[1]: *** [Makefile:3620: apps/lib/libapps-lib-app_libctx.o] Error 127 make[1]: Leaving directory '/home/name/Documents/pacman-static/src/openssl-3.1.4' make: *** [Makefile:2621: build_libs] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

I am confused with regard to your intentions and actions for troubleshooting.

IIUC:

  1. Your task is to install a working pacman.
  2. There is an Arch wiki section about it.
  3. The order of Archwiki instructions are usually from easier to complicated.
  4. If you have not much experience or confidence on the task, go easy-slowly, and follow the Archwiki order.

Posting here, suggests you would expect some assistance or advice.

  • In order for anyone to assist you, they have to know technical details of your situation.
  • Assuming you have little experience, you should post everything from your terminal output, replacing only sensitive/private stuff.
  • Unless you run commands in TTY and there is no Internet connection, you should only post text, NOT IMAGES. Just copy and paste.

I suggest you start from this, and follow the above suggestions.

I apologise if my last two comments were confusing, I’m not the best at explaining things. I am now back on my actual machine (not using the live USB) and I am currently trying to follow the Arch wiki’s guide on how to install pacman-static. However, when I do makepkg --skippgpcheck (I get an error that some PGP signatures can’t be verified if I don’t run it with --skippgpcheck), I get the following error, which I can’t find anything on:

[name@T480 pacman-static]$ makepkg --skippgpcheck
==> Making package: pacman-static 6.0.2-9 (Sat 04 Nov 2023 23:17:29)
==> Checking runtime dependencies...
/usr/bin/pacman: error while loading shared libraries: /usr/lib/libgpgme.so.11: file too short
==> Checking buildtime dependencies...
/usr/bin/pacman: error while loading shared libraries: /usr/lib/libgpgme.so.11: file too short
==> Retrieving sources...
  -> Found pacman-6.0.2.tar.xz
  -> Found pacman-6.0.2.tar.xz.sig
  -> Found pacman-always-create-directories-from-debugedit.patch
  -> Found pacman-always-create-directories-from-debugedit-fixup.patch
  -> Found pacman-fix-unique-source-paths.patch
  -> Found pacman-strip-include-o-files-similar-to-kernel-modules.patch
  -> Found pacman-fix-compatibility-with-bash-5.2-patsub_replacement.patch
  -> Found pacman-fix-order-of-fakechroot-fakeroot-nesting.patch
  -> Found nghttp2-1.58.0.tar.xz
  -> Found c-ares-1.21.0.tar.gz
  -> Found c-ares-1.21.0.tar.gz.asc
  -> Found curl-8.4.0.tar.gz
  -> Found curl-8.4.0.tar.gz.asc
  -> Found openssl-3.1.4.tar.gz
  -> Found openssl-3.1.4.tar.gz.asc
  -> Found ca-dir.patch
  -> Found openssl-3.0.7-no-atomic.patch
  -> Found zlib-1.3.tar.gz
  -> Found zlib-1.3.tar.gz.asc
  -> Found xz-5.4.4.tar.gz
  -> Found xz-5.4.4.tar.gz.sig
  -> Found bzip2-1.0.8.tar.gz
  -> Found bzip2-1.0.8.tar.gz.sig
  -> Found zstd-1.5.5.tar.zst
  -> Found zstd-1.5.5.tar.zst.sig
  -> Found libgpg-error-1.47.tar.bz2
  -> Found libgpg-error-1.47.tar.bz2.sig
  -> Found libassuan-2.5.6.tar.bz2
  -> Found libassuan-2.5.6.tar.bz2.sig
  -> Found gpgme-1.23.1.tar.bz2
  -> Found gpgme-1.23.1.tar.bz2.sig
  -> Found libarchive-3.7.2.tar.xz
  -> Found libarchive-3.7.2.tar.xz.asc
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
    pacman-6.0.2.tar.xz ... Passed
    pacman-6.0.2.tar.xz.sig ... Skipped
    pacman-always-create-directories-from-debugedit.patch ... Passed
    pacman-always-create-directories-from-debugedit-fixup.patch ... Passed
    pacman-fix-unique-source-paths.patch ... Passed
    pacman-strip-include-o-files-similar-to-kernel-modules.patch ... Passed
    pacman-fix-compatibility-with-bash-5.2-patsub_replacement.patch ... Passed
    pacman-fix-order-of-fakechroot-fakeroot-nesting.patch ... Passed
    nghttp2-1.58.0.tar.xz ... Passed
    c-ares-1.21.0.tar.gz ... Passed
    c-ares-1.21.0.tar.gz.asc ... Skipped
    curl-8.4.0.tar.gz ... Passed
    curl-8.4.0.tar.gz.asc ... Skipped
    openssl-3.1.4.tar.gz ... Passed
    openssl-3.1.4.tar.gz.asc ... Skipped
    ca-dir.patch ... Passed
    openssl-3.0.7-no-atomic.patch ... Passed
    zlib-1.3.tar.gz ... Passed
    zlib-1.3.tar.gz.asc ... Skipped
    xz-5.4.4.tar.gz ... Passed
    xz-5.4.4.tar.gz.sig ... Skipped
    bzip2-1.0.8.tar.gz ... Passed
    bzip2-1.0.8.tar.gz.sig ... Skipped
    zstd-1.5.5.tar.zst ... Passed
    zstd-1.5.5.tar.zst.sig ... Skipped
    libgpg-error-1.47.tar.bz2 ... Passed
    libgpg-error-1.47.tar.bz2.sig ... Skipped
    libassuan-2.5.6.tar.bz2 ... Passed
    libassuan-2.5.6.tar.bz2.sig ... Skipped
    gpgme-1.23.1.tar.bz2 ... Passed
    gpgme-1.23.1.tar.bz2.sig ... Skipped
    libarchive-3.7.2.tar.xz ... Passed
    libarchive-3.7.2.tar.xz.asc ... Skipped
==> Validating source files with b2sums...
    pacman-6.0.2.tar.xz ... Passed
    pacman-6.0.2.tar.xz.sig ... Skipped
    pacman-always-create-directories-from-debugedit.patch ... Passed
    pacman-always-create-directories-from-debugedit-fixup.patch ... Passed
    pacman-fix-unique-source-paths.patch ... Passed
    pacman-strip-include-o-files-similar-to-kernel-modules.patch ... Passed
    pacman-fix-compatibility-with-bash-5.2-patsub_replacement.patch ... Passed
    pacman-fix-order-of-fakechroot-fakeroot-nesting.patch ... Passed
    nghttp2-1.58.0.tar.xz ... Passed
    c-ares-1.21.0.tar.gz ... Passed
    c-ares-1.21.0.tar.gz.asc ... Skipped
    curl-8.4.0.tar.gz ... Passed
    curl-8.4.0.tar.gz.asc ... Skipped
    openssl-3.1.4.tar.gz ... Passed
    openssl-3.1.4.tar.gz.asc ... Skipped
    ca-dir.patch ... Passed
    openssl-3.0.7-no-atomic.patch ... Passed
    zlib-1.3.tar.gz ... Passed
    zlib-1.3.tar.gz.asc ... Skipped
    xz-5.4.4.tar.gz ... Passed
    xz-5.4.4.tar.gz.sig ... Skipped
    bzip2-1.0.8.tar.gz ... Passed
    bzip2-1.0.8.tar.gz.sig ... Skipped
    zstd-1.5.5.tar.zst ... Passed
    zstd-1.5.5.tar.zst.sig ... Skipped
    libgpg-error-1.47.tar.bz2 ... Passed
    libgpg-error-1.47.tar.bz2.sig ... Skipped
    libassuan-2.5.6.tar.bz2 ... Passed
    libassuan-2.5.6.tar.bz2.sig ... Skipped
    gpgme-1.23.1.tar.bz2 ... Passed
    gpgme-1.23.1.tar.bz2.sig ... Skipped
    libarchive-3.7.2.tar.xz ... Passed
    libarchive-3.7.2.tar.xz.asc ... Skipped
==> Extracting sources...
  -> Extracting pacman-6.0.2.tar.xz with bsdtar
  -> Extracting nghttp2-1.58.0.tar.xz with bsdtar
  -> Extracting c-ares-1.21.0.tar.gz with bsdtar
  -> Extracting curl-8.4.0.tar.gz with bsdtar
  -> Extracting openssl-3.1.4.tar.gz with bsdtar
  -> Extracting zlib-1.3.tar.gz with bsdtar
  -> Extracting xz-5.4.4.tar.gz with bsdtar
  -> Extracting bzip2-1.0.8.tar.gz with bsdtar
  -> Extracting zstd-1.5.5.tar.zst with bsdtar
  -> Extracting libgpg-error-1.47.tar.bz2 with bsdtar
  -> Extracting libassuan-2.5.6.tar.bz2 with bsdtar
  -> Extracting gpgme-1.23.1.tar.bz2 with bsdtar
  -> Extracting libarchive-3.7.2.tar.xz with bsdtar
==> Starting prepare()...
  -> Applying pacman patch pacman-always-create-directories-from-debugedit.patch...
patching file scripts/libmakepkg/tidy/strip.sh.in
  -> Applying pacman patch pacman-always-create-directories-from-debugedit-fixup.patch...
patching file scripts/libmakepkg/tidy/strip.sh.in
  -> Applying pacman patch pacman-fix-unique-source-paths.patch...
patching file scripts/libmakepkg/tidy/strip.sh.in
  -> Applying pacman patch pacman-strip-include-o-files-similar-to-kernel-modules.patch...
patching file scripts/libmakepkg/tidy/strip.sh.in
  -> Applying pacman patch pacman-fix-compatibility-with-bash-5.2-patsub_replacement.patch...
patching file scripts/libmakepkg/source/file.sh.in
  -> Applying pacman patch pacman-fix-order-of-fakechroot-fakeroot-nesting.patch...
patching file test/pacman/pmtest.py
patching file apps/CA.pl.in
patching file apps/openssl.cnf
==> Removing existing $pkgdir/ directory...
==> Starting build()...
Configuring OpenSSL version 3.1.4 for target linux-x86_64
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created Makefile.in
Created Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/asn1.h.in > include/openssl/asn1.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/asn1t.h.in > include/openssl/asn1t.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/bio.h.in > include/openssl/bio.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/cmp.h.in > include/openssl/cmp.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/cms.h.in > include/openssl/cms.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/conf.h.in > include/openssl/conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/crmf.h.in > include/openssl/crmf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/crypto.h.in > include/openssl/crypto.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/ct.h.in > include/openssl/ct.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/err.h.in > include/openssl/err.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/ess.h.in > include/openssl/ess.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/fipskey.h.in > include/openssl/fipskey.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/lhash.h.in > include/openssl/lhash.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/ocsp.h.in > include/openssl/ocsp.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/opensslv.h.in > include/openssl/opensslv.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/pkcs12.h.in > include/openssl/pkcs12.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/pkcs7.h.in > include/openssl/pkcs7.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/safestack.h.in > include/openssl/safestack.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/srp.h.in > include/openssl/srp.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/ssl.h.in > include/openssl/ssl.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/ui.h.in > include/openssl/ui.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/x509.h.in > include/openssl/x509.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/x509_vfy.h.in > include/openssl/x509_vfy.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" include/openssl/x509v3.h.in > include/openssl/x509v3.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" "-oMakefile" test/provider_internal_test.cnf.in > test/provider_internal_test.cnf
make depend && make _build_libs
make[1]: Entering directory '/home/name/Documents/pacman-static/src/openssl-3.1.4'
make[1]: Leaving directory '/home/name/Documents/pacman-static/src/openssl-3.1.4'
make[1]: Entering directory '/home/name/Documents/pacman-static/src/openssl-3.1.4'
musl-gcc  -I. -Iinclude -Iapps/include  -pthread -m64 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -D_LARGEFILE64_SOURCE -Wa,--noexecstack  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -D_LARGEFILE64_SOURCE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -static -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/home/name/Documents/pacman-static/src/temp/usr/lib/engines-3\"" -DMODULESDIR="\"/home/name/Documents/pacman-static/src/temp/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG   -c -o apps/lib/libapps-lib-app_libctx.o apps/lib/app_libctx.c
/bin/sh: line 1: musl-gcc: command not found
make[1]: *** [Makefile:3609: apps/lib/libapps-lib-app_libctx.o] Error 127
make[1]: Leaving directory '/home/name/Documents/pacman-static/src/openssl-3.1.4'
make: *** [Makefile:2610: build_libs] Error 2
==> ERROR: A failure occurred in build().
    Aborting...``

I have looked online to see what this error could mean, but I cannot find any solution. From what I’ve read it’s something to do with base-devel or musl not being on my system, but I’ve no way of knowing because even running pacman -Qs gives me the same error. And if they’re not installed, I don’t know how else to install them as now even trying to install something through my live usb using --sysroot gives me a pile of error: failed retrieving file 'x' from y: Could not resolve host: y errors, even though I’m connected to the internet.

I am trying the first two options on the Arch wiki and they both seem to give some kind of bother that isn’t documented on the wiki, and the third option comes with a warning how it can break your system so I want to get assistance with (on matters that the wiki doesn’t cover) and fully explore the first two options first before I need to try it.

This error is about mirrorlist servers not found. Check and improve the mirrorlist (from the installer Live ISO) and test again.

Have you tried the bin packages, before moving to the 2nd option?

Using pacman-static

The pinned comment and the PKGBUILD provides a way to directly download the binary, which can be used to reinstall pacman or to upgrade the entire system in case of partial upgrades.

AUR comment:

Pre compiled binaries
https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/

I have not tried myself, but I guess you can download pacman-static binary and run in directly (confirm it is executable).

1 Like

Thank you so much, downloading the pre compiled binary is what helped me. I then ran sudo ./pacman-static -S gpgme --overwrite '*' and pacman started to work again. As for the issues with XFCE and its affiliated programs not starting up, turns out thunar-archive-plugin and xfconf broke too so I fixed them the same way. I’m now back on XFCE and everything’s almost back in working order except for the text on my login screen still being those blank characters, but no worries I’ll fix that eventually (otherwise all fonts seem to work?). Once again thanks a ton, and apologies for my less than clear explanations.

1 Like

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