/usr/bin/stat: cannot execute: required file not found

The issue I am facing:

The past couple of days I have been receiving the below warning when updating gravity...

[✓] Optimizing database
[i] Swapping databases.../opt/pihole/gravity.sh: line 122: /usr/bin/stat: cannot execute: required file not found
/opt/pihole/gravity.sh: line 124: /usr/bin/stat: cannot execute: required file not found
/opt/pihole/gravity.sh: line 128: [: : integer expression expected
[✓] Swapping databases
[✓] Cleaning up stray matter

[✓] Done.

I don't recall having changed anything recently and as far as I can tell Pi-Hole appears to be working correctly. Is this warning something I need to be concerned about?

Details about my system:

  • Core [v6.0.6]
  • FTL [v6.1]
  • Web interface [v6.1]
  • Raspberry Pi 3B
  • Linux 6.6.74+rpt-rpi-v8 [aarch64] @ Debian

What I have changed since installing Pi-hole:

pi-hole uses the stat command in it's scripts. stat is part of the coreutils package.

Try to install coreutils with sudo apt reinstall coreutils and see if your errors go away.

Thanks, Ladrien. That has indeed cleared the warning. Not sure what happened to cause that but it must've been something I did.