RPI update failure

The issue I am facing: when i try to update I get a failure message

[✓] Root user check

    .;;,.
    .ccccc:,.
     :cccclll:.      ..,,
      :ccccclll.   ;ooodc
       'ccll:;ll .oooodc
         .;cll.;;looo:.
             .. ','.
            .',,,,,,'.
          .',,,,,,,,,,.
        .',,,,,,,,,,,,....
      ....''',,,,,,,'.......
    .........  ....  .........
    ..........      ..........
    ..........      ..........
    .........  ....  .........
      ........,,,,,,,'......
        ....',,,,,,,,,,,,.
           .',,,,,,,,,'.
            .',,,,,,'.
              ..'''.

[i] SELinux not detected
[✓] Building dependency package pihole-meta.deb
[✗] Installing Pi-hole dependency package
Error: Unable to install Pi-hole dependency package.

Details about my system: this is a raspberry Pi 4B

What I have changed since installing Pi-hole: tried to update using ssh command pihole -up

I'm not a linux Guru so if someone can help , please try to explain in detailed steps if needed.

Thanks

Try command

sudo apt-get -y update && sudo apt-get -y upgrade

before you try to update Pihole.

Thanks for help, update start fine but at the end i get always same errors:

:check_mark: Metadata cache was updated successfully.
Setting up raspi-firmware (1:1.20260521-1~bookworm) ...
stat: cannot read file system information for '/boot/firmware': No such file or directory
Error: missing /boot/firmware, did you forget to mount it?
dpkg: error processing package raspi-firmware (--configure):
installed raspi-firmware package post-installation script subprocess returned error exit status 1
Setting up chromium-l10n (1:150.0.7871.114-1~deb12u1+rpt1) ...
dpkg: dependency problems prevent configuration of sense-hat:
sense-hat depends on raspi-firmware; however:
Package raspi-firmware is not configured yet.

dpkg: error processing package sense-hat (--configure):
dependency problems - leaving unconfigured
Setting up libmagickwand-6.q16-6:arm64 (8:6.9.11.60+dfsg-1.6+deb12u12) ...
Setting up python3.11 (3.11.2-6+deb12u8) ...
Setting up libpython3.11:arm64 (3.11.2-6+deb12u8) ...
Setting up libmagickcore-6.q16-6-extra:arm64 (8:6.9.11.60+dfsg-1.6+deb12u12) ...
Setting up python3.11-venv (3.11.2-6+deb12u8) ...
Setting up libpython3.11-dev:arm64 (3.11.2-6+deb12u8) ...
Setting up imagemagick-6.q16 (8:6.9.11.60+dfsg-1.6+deb12u12) ...
Setting up python3.11-dev (3.11.2-6+deb12u8) ...
Setting up imagemagick (8:6.9.11.60+dfsg-1.6+deb12u12) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u14) ...
Processing triggers for systemd (252.39-1~deb12u2) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for initramfs-tools (0.142+rpt4+deb12u3) ...
Errors were encountered while processing:
raspi-firmware
sense-hat
E: Sub-process /usr/bin/dpkg returned an error code (1)
-bash: [/quote]: No such file or directory

Oops ....

I have no idea why your OS updates failed but even bookworm is actually a bit outdated.
Maybe your filesystem is currupted or the SD card is going to die.

My advise: Save your Pihole configuration by teleporter if possible, take a new SD card and setup a new system. It will cost you appr. an hour but rewards you with an up to date system.

well i found elsewhere a post (Errors were encountered while processing: raspi-firmware E: Sub-process /usr/bin/dpkg returned an error code (1) · Issue #7085 · MichaIng/DietPi · GitHub) giving command to try, did it and it went like a breeze to do pihole -up

apt autopurge raspi-firmware

This is not a solution - it's a potentially dangerous workaround. Damaged packages like this are often caused by filesystem corruption on SD cards in raspberry Pi.

The true solution is contained several posts above

thanks for caring about my pi , but not sure this time this a sd card problem, once done the last command i posted, all the updates went like a breeze.

The RPi never stuck on boot or any else working time. so for now i'm not afraid about pihole needing a full reinstall.

But to keep a backup possible with all settings , i just saved config with teleporter.

Good luck in any case!

Not really : Debian -- Debian “bookworm” Release Information

I think you are maybe confused with an older version like Bullseye or so ?!

Bookworm = Debian 12.x
Trixie = Debian 13.x and currently the newest Stable version.

So not a very big deal considering the LTS support it's now in :slight_smile:

Oh ... cool. Nice to know.

But if you look into the official Raspi OS download you can see "Bookworm" is marked as "LEGACY". To me personal that is an indicator of EOL and if you're asked to set up an actual system you should refer to the latest and most secure one.
Or do you see that differently ?

to update the firmware on your bootloader on a Pi 4 ..try

sudo apt rpi-eeprom-update -a

I don't see that differently and no one mentioned anything like that so why start a discussion about it ?! :face_with_raised_eyebrow:

So, who ist confused?

I didn't start a discussion but you made a personal comment.

That missing `/boot/firmware` directory is the real blocker now — sounds like it's beyond just the package conflicts at this point. Worth checking whether that dir actually exists on your system or if something went wrong with your boot setup.

IIRC it's not a real directory since one of the two last Raspberry Pi OS releases and you can't mount it offline because of that : It's a symlink kind of thing! :frowning:

Trying that command (removing -a) i get:

E: invalid operation rpi-eeprom

otherwise with -a , iget

command line option 'a' [from -a] is not understood in combination with the other options.