You are not logged in.

#1 2023-04-15 00:06:44

chuckd333
Member
Registered: 2023-03-09
Posts: 28

[SOLVED] Pacman error loading shared libraries...so.0 file too short

System crashed during pacman - Syu. And now can't boot. Kernel panic...

So I Booted in archiso.

Did all the recommendations:

Rm -r /var/log/cache/sync

pacman --sysroot /mnt -Syu

When I arch-chroot in and run any pacman command I get error:

Pacman: error while loading shared libraries: /use/lib/libgpg-error.so.0: file too short.

Rebuilding mkinitcpio failed as well.

Searched for all '0' files and all my files came back.

Not sure what to do from here. Any ideas?

<Posting from phone>

Last edited by chuckd333 (2023-04-15 21:27:59)

Offline

#2 2023-04-15 00:19:21

set
Member
Registered: 2023-04-14
Posts: 15

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

This error happens due to lack of update,
if you do the procedures and nothing happens, reinstall the system,
and don't forget to update.

Offline

#3 2023-04-15 00:30:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,380
Website

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

chuckd333 wrote:

Searched for all '0' files and all my files came back.

All?  I doubt that.  Do you mean all files from that package?  Or all files owned by packages involved in the last update?  Or ...

You may just need to reinstall libgpg-error, or perhaps other packages that own zero-length files.  The "-Syu" would not do it as pacman has the packages marked as installed, so it will not reinstall them unless you explicitly tell it to, e.g. to reinstall all packages:

pacman --sysroot /mnt -Qq | pacman --sysroot /mnt -S -

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2023-04-15 15:46:15

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

I meant all recommendations I could find on this forum and elsewhere...

Ran that command and received "error target not found" for all of my packages...

Offline

#5 2023-04-15 15:54:03

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

Also tried...

‘pacstrap -K /mnt base‘

Error were.

‘ldconfig file /usr/lib/libudev.so.1 is empty, not checked.‘

Same error for libsystemd, libgcrypt, libgpg-error, libgcrypt, libnss_resolve and a few others... Then process quits without installing

Offline

#6 2023-04-15 16:02:21

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

`pacman --sysroot /mnt -Syu` gave me:

```
synchronizing package databases...
core is up to date,
extra up to date,
community up to date
error:GPGME error:Invalid crypto engine
error:failed to synchronize all databases (invalid or corrupted databases (PGP signature))
```

Offline

#7 2023-04-15 16:20:14

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

ran this:

# pacman --root /mnt --cache /mnt/var/cache/pacman/pkg -Syu

received a bunch of

error: gupnp-igd: signature from "Jan Alexander ... is invalid :: File /mnt/var/.../gupnp-igd... is corrupted (invalid or corrupted pacakge (PGPsignature))
...
errors occurred no packages updated

Last edited by chuckd333 (2023-04-15 16:21:29)

Offline

#8 2023-04-15 16:33:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,380
Website

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

Please be precise, and post full and complete output.  I currently have no idea what state your system is in as in one post you said all your files had zero size, and when I asked what you meant by "all" you said you tried all recommendations you could find online ... how does that say anything about which files are of zero size?

Many of the things you are trying would not even be expected to work.  You (most likely) have incomplete downloads of packages in your systems cache - you need to not use the cached packages.  You also apparently have at least a couple system libraries which are short / empty.  These need to be reinstalled.  But to get more specific advice we'd need to get clear answers and complete commands and output.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2023-04-15 16:46:53

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

I'm on my phone so can't re-write all errors I get from the commands I run...

I tried to add the relevant info without typing the entire message since that is too onerous on a phone

Last edited by chuckd333 (2023-04-15 16:49:46)

Offline

#10 2023-04-15 16:48:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,380
Website

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

You had an internet connection from the live iso, right?  Post it from there.

Last edited by Trilby (2023-04-15 16:48:51)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2023-04-15 16:50:58

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

oh. OK. Didn't know I could do that or how. ok let me look in to that

Offline

#12 2023-04-15 17:17:32

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

got it. that's a lifesaver. thanks. So...

From Archiso...

# lsblk
nvme0n1p1 ... /mnt/boot  //EFI partition
nvme0n1p3.../mnt //root system

I ran:

pacstrap -K /mnt base | curl -F 'file=@-' 0x0.st

result:
http://0x0.st/H8B-.txt

Last edited by chuckd333 (2023-04-15 17:18:13)

Offline

#13 2023-04-15 17:26:12

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

also this from another post on this forum who had a similar issue:

From the live environment:

pacman --root /mnt --cache /mnt/var/cache/pacman/pkg -Syu

result:

http://0x0.st/H8B8.txt

Offline

#14 2023-04-15 17:28:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,380
Website

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

Thanks - add the broken packages to that command:

pacstrap -K /mnt base libgcrypt libgpg-error systemd-libs

Last edited by Trilby (2023-04-15 17:28:47)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#15 2023-04-15 17:37:04

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

pacman.log

http://0x0.st/H8Bq.txt

the system crashed during

pacman -Syu

on 13 April 2023...

Offline

#16 2023-04-15 17:42:00

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

error: failed to commit transaction (conflicting files)
==> ERROR:Failed to install packages to new root

http://0x0.st/H8BT.txt

Offline

#17 2023-04-15 17:53:37

loqs
Member
Registered: 2014-03-06
Posts: 18,467

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

From the live media with the system mounted to /mnt what is the output of:

# pacman --root /mnt -Qkk 2>&1 | grep -Fv '0 altered files'

Last edited by loqs (2023-04-15 17:53:48)

Offline

#18 2023-04-15 18:00:16

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

result from:

pacman --root /mnt -Qkk 2>&1 | grep -Fv '0 altered files'

http://0x0.st/H8BS.txt

Offline

#19 2023-04-15 18:25:36

loqs
Member
Registered: 2014-03-06
Posts: 18,467

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

Fix the corrupted database files

# pacman --root /mnt --cache /mnt/var/cache/pacman/pkg --dbonly systemd systemd-libs iana-etc libgcrypt libgpg-error

Then try the full system update again

# pacman --root /mnt --cache /mnt/var/cache/pacman/pkg -Syu

Offline

#20 2023-04-15 20:18:25

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

I added -S at the end

# pacman --root /mnt --cache /mnt/var/cache/pacman/pkg --dbonly systemd systemd-libs iana-etc libgcrypt libgpg-error -S
error: command failed to execute correctly

full result:
http://0x0.st/H8MA.txt

I tried to add proc:

# mkdir /mnt/proc && mount proc /mnt/proc

error message received:

mount:/mnt/proc:special device proc does not exist. dmesg may have more information after failed mount system call

result from running

# dmesg

from the live  environment is at:

http://0x0.st/H8MB.txt

Last edited by chuckd333 (2023-04-15 20:29:37)

Offline

#21 2023-04-15 20:21:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,380
Website

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

You'll need to rerun the command from #14 with the --overwrite flag (with the appropriate argument to it)

Last edited by Trilby (2023-04-15 20:23:36)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#22 2023-04-15 20:58:24

loqs
Member
Registered: 2014-03-06
Posts: 18,467

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

Trilby wrote:

You'll need to rerun the command from #14 with the --overwrite flag (with the appropriate argument to it)

If the database files were updated before the hooks at the end of the transaction failed the overwrite flag may not be needed.

Offline

#23 2023-04-15 21:23:57

chuckd333
Member
Registered: 2023-03-09
Posts: 28

Re: [SOLVED] Pacman error loading shared libraries...so.0 file too short

That worked!

Thank you both for taking the time on the weekend to help me. The

--overwrite

flag did it. For others...I ran from the live USB:

# pacstrap -K /mnt --overwrite base libgcrypt libgpg-error systemd-libs

I ran that before seeing loqs entry. The command I ran with

--dbonly

didn't work so I don't think the database files were updated but don't quote me on that.

Thanks again.

Offline

Board footer

Powered by FluxBB