You are not logged in.

#1 2022-07-26 22:45:06

salmon
Member
Registered: 2022-05-27
Posts: 12

[solved] Error loading shared library (libcap) file too short

After doing a full system upgrade (with yay if it makes a difference) the kernel is panicking on boot. I'm not gona type the full error but will if necessary

/sbin/init: error while loading shared libraries: /usr/lib/libcap.so.2: file too short

I read some other posts with similar errors. I read this one specifically, but couldn't figure out how to "unpack shared libraries " to reinstall.
Thanks ahead of time.

Last edited by salmon (2022-07-27 16:13:09)

Offline

#2 2022-07-26 23:03:34

loqs
Member
Registered: 2014-03-06
Posts: 15,094

Re: [solved] Error loading shared library (libcap) file too short

Haver you tried Pacman#Pacman_crashes_during_an_upgrade?  Which might be simpler to follow.
Edit:
Follow steps 1 to 3 skip 4 and 5 and reinstall libpcap in step 6.
If that does not fix the issue,  chroot in from the live media and post the output of

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

To a pastebin (link contains details to post from console).

Last edited by loqs (2022-07-26 23:23:22)

Offline

#3 2022-07-27 00:11:27

salmon
Member
Registered: 2022-05-27
Posts: 12

Re: [solved] Error loading shared library (libcap) file too short

Thanks for the quick response!
http://0x0.st/ojwg.txt is the output of that command

Offline

#4 2022-07-27 00:27:58

loqs
Member
Registered: 2014-03-06
Posts: 15,094

Re: [solved] Error loading shared library (libcap) file too short

The following will restore the missing mtree files than reinstall the packages themselves.  Same as before follow steps 1 to 3 use below for step 6 and post any errors from the commands

pacman --sysroot /mnt -S --dbonly amdvlk appstream-glib babl debootstrap gegl gsm harfbuzz haskell-adjunctions haskell-aeson haskell-asn1-encoding haskell-asn1-parse haskell-asn1-types haskell-assoc haskell-async haskell-attoparsec haskell-base-compat-batteries haskell-base-orphans haskell-base64-bytestring haskell-bifunctors haskell-blaze-html haskell-blaze-markup haskell-call-stack haskell-case-insensitive haskell-comonad haskell-conduit haskell-conduit-extra haskell-connection haskell-cryptonite haskell-data-default haskell-data-default-instances-dlist haskell-data-fix haskell-dbus haskell-distributive haskell-dlist haskell-free haskell-hashable haskell-hinotify haskell-hourglass haskell-http haskell-http-client haskell-http-client-tls haskell-http-conduit haskell-http-types haskell-indexed-traversable-instances haskell-invariant haskell-iproute haskell-kan-extensions haskell-lens haskell-libmpd haskell-memory haskell-mono-traversable haskell-network haskell-network-uri haskell-onetuple haskell-pem haskell-primitive haskell-profunctors haskell-random haskell-reflection haskell-resourcet haskell-safe-exceptions haskell-scientific haskell-semigroupoids haskell-socks haskell-split haskell-splitmix haskell-streaming-commons haskell-strict haskell-th-compat haskell-these haskell-time-compat haskell-tls haskell-typed-process haskell-unordered-containers haskell-utf8-string haskell-uuid-types haskell-vector haskell-vector-algorithms haskell-void haskell-x11-xft haskell-x509 haskell-x509-store haskell-x509-system haskell-x509-validation haskell-xml-conduit haskell-zlib hwloc iso-codes lib32-amdvlk lib32-libcap lib32-mesa libcap libplacebo libspiro lv2 mobile-broadband-provider-info npm plasma-workspace protobuf python-pip ruby-diff-lcs ruby-rspec ruby-rspec-core ruby-rspec-expectations ruby-rspec-mocks ruby-rspec-support serd sord sratom vlc xmobar
pacman --sysroot /mnt -S amdvlk appstream-glib babl debootstrap gegl gsm harfbuzz haskell-adjunctions haskell-aeson haskell-asn1-encoding haskell-asn1-parse haskell-asn1-types haskell-assoc haskell-async haskell-attoparsec haskell-base-compat-batteries haskell-base-orphans haskell-base64-bytestring haskell-bifunctors haskell-blaze-html haskell-blaze-markup haskell-call-stack haskell-case-insensitive haskell-comonad haskell-conduit haskell-conduit-extra haskell-connection haskell-cryptonite haskell-data-default haskell-data-default-instances-dlist haskell-data-fix haskell-dbus haskell-distributive haskell-dlist haskell-free haskell-hashable haskell-hinotify haskell-hourglass haskell-http haskell-http-client haskell-http-client-tls haskell-http-conduit haskell-http-types haskell-indexed-traversable-instances haskell-invariant haskell-iproute haskell-kan-extensions haskell-lens haskell-libmpd haskell-memory haskell-mono-traversable haskell-network haskell-network-uri haskell-onetuple haskell-pem haskell-primitive haskell-profunctors haskell-random haskell-reflection haskell-resourcet haskell-safe-exceptions haskell-scientific haskell-semigroupoids haskell-socks haskell-split haskell-splitmix haskell-streaming-commons haskell-strict haskell-th-compat haskell-these haskell-time-compat haskell-tls haskell-typed-process haskell-unordered-containers haskell-utf8-string haskell-uuid-types haskell-vector haskell-vector-algorithms haskell-void haskell-x11-xft haskell-x509 haskell-x509-store haskell-x509-system haskell-x509-validation haskell-xml-conduit haskell-zlib hwloc iso-codes lib32-amdvlk lib32-libcap lib32-mesa libcap libplacebo libspiro lv2 mobile-broadband-provider-info npm plasma-workspace protobuf python-pip ruby-diff-lcs ruby-rspec ruby-rspec-core ruby-rspec-expectations ruby-rspec-mocks ruby-rspec-support serd sord sratom vlc xmobar

Offline

#5 2022-07-27 01:11:06

salmon
Member
Registered: 2022-05-27
Posts: 12

Re: [solved] Error loading shared library (libcap) file too short

Errors:

error: debootstrap: signature is invalid
# idk if this pkg is important 
# the asks if I want to delete it, said yes
# same thing for maybe 20 pkgs after that
error: failed to commit transaction (invalid or corrupted package)
Errors occured, no packages were upgraded.

This all just the first cmd, I didn't run the second.

Offline

#6 2022-07-27 07:18:58

seth
Member
Registered: 2012-09-03
Posts: 30,899

Re: [solved] Error loading shared library (libcap) file too short

Try to re-run the first command, you'll hopefully download uncorrupted versions of the package (unless they've already been updated again)

Offline

#7 2022-07-27 16:10:53

salmon
Member
Registered: 2022-05-27
Posts: 12

Re: [solved] Error loading shared library (libcap) file too short

Thank you!
There was an error about some idconfig file being empty but it's booting so everything's good

Offline

#8 2022-07-27 16:13:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 16,718

Re: [solved] Error loading shared library (libcap) file too short

do not just handwave those, what was the exact message? check the /var/log/pacman.log in doubt/if you can't reproduce. however if you consider this [SOLVED] mark it as such by editing the title in the first post

Offline

#9 2022-07-27 16:14:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,433

Re: [solved] Error loading shared library (libcap) file too short

Personally, I would reinstall all packages at this point. Everything so far has pointed to MASSIVE filesystem corruption, and that ldconfig error shows that there's still some left.

Offline

#10 2022-07-28 00:36:09

salmon
Member
Registered: 2022-05-27
Posts: 12

Re: [solved] Error loading shared library (libcap) file too short

Scimmia wrote:

Personally, I would reinstall all packages at this point. Everything so far has pointed to MASSIVE filesystem corruption, and that ldconfig error shows that there's still some left.

There most likely is a lot of corruption on my system, buy I expected this.
A. I have 3 or 4 different linux distros installed on 1 ssd, and I switch them a lot because of a script I'm writing that I test on them (vms won't work as I need to test on actual hardware)
B. (Not to sound rude) but I honestly don't care, it's about time for a reinstall anyway, as my partitions are messed up and some other stuff.

Anyways thanks for confirming my though!

Offline

#11 2022-07-28 00:36:41

salmon
Member
Registered: 2022-05-27
Posts: 12

Re: [solved] Error loading shared library (libcap) file too short

V1del wrote:

do not just handwave those, what was the exact message? check the /var/log/pacman.log in doubt/if you can't reproduce. however if you consider this [SOLVED] mark it as such by editing the title in the first post

Same goes for this

Offline

Board footer

Powered by FluxBB