Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update failure for 6.24.1 #2836

Closed
raysqa opened this issue May 20, 2019 · 3 comments
Closed

Update failure for 6.24.1 #2836

raysqa opened this issue May 20, 2019 · 3 comments
Labels
Not a DietPi issue Solution available 🥂 Definite solution has been done

Comments

@raysqa
Copy link

raysqa commented May 20, 2019

Details:

  • Date | Mon May 20 06:48:43 MDT 2019
  • Bug report | N/A
  • DietPi version | v6.22.3 (MichaIng/master)
  • Img creator | DietPi Core Team
  • Pre-image | Raspbian Lite
  • SBC device | RPi Zero W (armv6l) (index=1)
  • Kernel version | Request | RT Kernel option #1200 Tue Feb 12 20:11:02 GMT 2019
  • Distro | stretch (index=4)
  • Command | G_AGUP
  • Exit code | 127
  • Software title |

Steps to reproduce:

  1. enter command DietPi-Update
  2. ...

Expected behaviour:

  • Distro should update from v.6.22.3 to 6.24.1

Actual behaviour:

  • Update failure - -get: error while loading shared libraries: libstdk++.so.6: cannot open shared
    ect file: No such file or directory

Retry does not work

Extra details:

  • ...

Additional logs:

Log file contents:
apt-get: error while loading shared libraries: libstdk++.so.6: cannot open shared object file: No such file or directory
apt-get: error while loading shared libraries: libstdk++.so.6: cannot open shared object file: No such file or directory
@MichaIng
Copy link
Owner

MichaIng commented May 20, 2019

@raysqa
Many thanks for your report.

First I thought it is about ARMv6 + PHP, but actually libstdk++.so.6 does not exist and should not, it's libstdc++.so.6 ("c" instead of "k") that is present on systems. Strange where this typo in APT came from. Also web search does not result in any single match (and to be failsafe, jep Raspbian repo does not have it: http://raspbian.raspberrypi.org/raspbian/dists/stretch/main/binary-armhf/Packages), so it's definitely a typo in your APT binary. Not sure if this comes from e.g. SDcard corruption.

Just to verify, run:

apt-get update

If that fails with the same error, let's see if the apt binary is affected as well:

apt update

To check for I/O errors:

dmesg
  • Paste any red lines that you see in the output.

If those appear, and actually to be failsafe, force a file system check (+repair) on reboot:

> /forcefsck
reboot

Since APT itself is affected it is a bid tricky to solve, when you sorted out or fixed any file system corruption.

We can link the existing correct library to where APT looks for it:

ln -s /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 /usr/lib/arm-linux-gnueabihf/libstdk++.so.6

Hopefully then apt update works through.

Then we need to reinstall the APT package:

apt install --reinstall apt

Hopefully that solves the typo, so we can remove the symlink again:

rm /usr/lib/arm-linux-gnueabihf/libstdk++.so.6
apt-get update

If this finally worked, then re-run the update:

dietpi-update 1

@raysqa
Copy link
Author

raysqa commented May 21, 2019 via email

@MichaIng
Copy link
Owner

MichaIng commented May 21, 2019

@raysqa
Yeah, I also regularly face this on my Pi/SDcard.... However fsck fixes it still, currently... Earlier or later I need a new SDcard. Not sure how old/how much in use yours is, but you should consider this as well. The SDcard might contain bad blocks, so parts where when written to, will always result in corrupted data.

And as a general advice:

  • Try to avoid writing to the SDcard as much as possible. Move swap file and dietpi userdata to external drives, use DietPi-RAMlog and such.
  • We are also thinking about further methods to reduce SDcard writes, e.g. allowing to move all the APT cache onto external drive or RAM. The whole cache is 120M on my system, which is regularly re-created.

Okay I mark the issue as closed. Feel free to reopen if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not a DietPi issue Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

2 participants