Apt-utills Apt install Issue

Creating a bug report/issue

Required Information

  • DietPi version | 8.6.1
  • Distro version | Bullseye 1
  • Kernel version | Linux DietPi 5.15.32+ #1538 Thu Mar 31 19:37:58 BST 2022 armv6l GNU/Linux
  • SBC model | RPi B+ (armv6l)
  • Power supply used | 5V USB Power Supply
  • SD card used | Samsung Pro 32 Gb

Additional Information (if applicable)

  • Software title | apt & apt-utils
  • Was the software title installed freshly or updated/migrated?
    freshly installed and then run update to update the OS
  • Can this issue be replicated on a fresh installation of DietPi?
    No, you have to successfully add the Sury PHP repository

Steps to reproduce

  1. Finish initial DietPi setup, then install ls-release
  2. Follow this guide for the Raspberry Pi OS version of the Sury Repository (Installing the Latest Versions of PHP on Raspberry Pi OS - Pi My Life Up)
  3. Run the command: apt install php8.0
  4. See error about apt-utils not being installed, then run: apt install apt-utils
  5. Error produced about how apt-utils can not be installed because apt-utils is not installed
  6. Try just about any built-in linux command

Expected behaviour

  • Should install apt-utils OR if an error, not break the rest of the OS and allow other built in commands to execute

Actual behaviour

  • Error message on just about every Linux command of “illegal Command”

Extra details

  • Things like dietpi-config and dietpi-software work, but this breaks apt, ls, dir, and other commands. I have to reformat my SD card and start with a fresh copy of the OS just to get basic functionality working again

  • Using the built-in SSH server to run commands and look at terminal output

Welcome to our community.

Usually it is not possible for apt package manager to break an entire system. Probably you have some file system corruption or a dying SD card. You could try checking for kernel error messages

dmesg -l err,crit,alert,emerg

This is btw not an error but an info that due to the missing package, possibly existing interactive package debconf options are not offered in a bunch before all package installs start, but during their installation. It is not required for anything than the comfort to pre-configure everything than go and drink a coffee, when you install a large number of packages :wink:.

However it shouldn’t break the system either of course.

The reason why your system breaks is that you install an ARMv7-only PHP on an ARMv6-only RPi. I’m also wondering why it breaks the whole system instead of only leading to a failing PHP service, but it’s known like that. I already reported this to Ondrej years ago, but since it is explicitly an ARMv7 repository, he didn’t find it reasonable to have a closer look.

If I remember right, it really is impossible now to do anything, especially purging the package again, right? So I’m AFRAID you need to reflash and stay with PHP7.4.

… ah another thought and explanation: The package pulls a lot of very basic system library upgrades from that repo, like libSSL. So every command with relies on any of those libraries is doomed to fail. Makes all sense then.