1

This seems really odd to me. I have a raspberry pi running Raspbian. I use it to run a shell script from time to time and pinhole. Today I noticed that its not working anymore. When trying to run the curl command, which is the first command in the shell script, I get the following output:

curl: error while loading shared libraries: lybnghttp2.so.14: cannot open shared object file: No such file or directory

When trying to run apt-get, I get this:

pi@raspberrypi:~ $ sudo apt-get
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 1) >= this->size() (which is 1)
Aborted

What could cause this strange behaviour? Everything worked yesterday. Raspbian shouldn't run any updates automatically, should it?

There should also be enough space the device:

pi@raspberrypi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  4.8G  8.8G  36% /
devtmpfs        460M     0  460M   0% /dev
tmpfs           464M  256K  464M   1% /dev/shm
tmpfs           464M   13M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1   44M   23M   22M  52% /boot
tmpfs            93M     0   93M   0% /run/user/1000
tmpfs            93M     0   93M   0% /run/user/999

Searching for the missing so with sudo find / -name 'lybnghttp2.so*' gave me this:

find: ‚/run/user/1000/gvfs‘: Permission denied
find: ‚/var/lib/apt/mirrors/partial‘: Structure needs cleaning

Is there anyone who experienced something similar and can help me?

7
  • Please run sudo find / -name 'lybnghttp2.so*' and put its result (which might be nothing, or it might be an error or a pathname) into your question.
    – roaima
    Aug 12 '19 at 21:11
  • @roaima unfortunately the file was not found. And when I tried reinstalling the curl package that strange apt-get error occurred Aug 12 '19 at 21:40
  • Did find produce any message at all? Any error?
    – roaima
    Aug 12 '19 at 21:41
  • Ah. You mistyped the error message. It's not lybnghttp2.so.14 it's libnghttp2.so.14. Repeat the find with the correctly spelled file, please.
    – roaima
    Aug 12 '19 at 21:43
  • @roaima I added the output to the post Aug 12 '19 at 21:45
1

You've got a corrupted filesystem on your SD card.

  • It might be that the SD card itself is dying, in which case copying off what you can before it dies completely would be the best option.
  • It might be that the SD card is fine and you just need to check the filesystem (using fsck during reboot) - shutdown -rF now will trigger this. But if it's the SD card that's broken this will probably destroy what remains of the filesystem in an attempt to fix it.

No easy answer here I'm afraid. Save what you can and then try the fsck-on-reboot.

2
  • 1
    Yeah now that you mentioned that it should be „lib“ and not „lyb“... of course. That makes sense. Bits are appearently flipped throughout the whole filesystem. Will save what’s left and throw the SD card. Thanks! Aug 12 '19 at 21:54
  • No actually the pi has been running for the past two years. Maybe that’s the problem. And it’s in a Place with not the best ventilation. Aug 12 '19 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.