Error: unable to install pi-hole dependency package

Please follow the below template, it will help us to help you!

Expected Behaviour:

  • Raspbian Pi os = Trixie
  • RPI 4B+ (4GB)
  • Docker - NO

Actual Behaviour:

When running: “sudo pihole -up” I get the following response:

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

What does this mean? I have updated Pi-Hole in the past a number of times without any issues.

Thanks,

Marc

Debug Token:

https://tricorder.pi-hole.net/oaRPHT8L/

Let’s see in detail, why it fails. What is the output of

sudo bash -x /opt/pihole/update.sh

owner@raspberrypi:~ $ sudo bash -x /opt/pihole/update.sh

readonly ADMIN_INTERFACE_GIT_URL=https://github.com/pi-hole/web.git

ADMIN_INTERFACE_GIT_URL=https://github.com/pi-hole/web.git

readonly PI_HOLE_GIT_URL=https://github.com/pi-hole/pi-hole.git

PI_HOLE_GIT_URL=https://github.com/pi-hole/pi-hole.git

readonly PI_HOLE_FILES_DIR=/etc/.pihole

PI_HOLE_FILES_DIR=/etc/.pihole

SKIP_INSTALL=true

CHECK_ONLY=false

source '/etc/.pihole/automated install/basic-install.sh'
++ set -e
++ export PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ trap abort INT QUIT TERM
++ : 0
++ : 1
++ : 255
+++ cat
++ DNS_SERVERS='Google (ECS, DNSSEC);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered, ECS, DNSSEC);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare (DNSSEC);1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+++ cat
++ DNS_SERVERS_IPV6_ONLY='Google (ECS, DNSSEC);2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);2620:119:35::35;2620:119:53::53
Quad9 (filtered, DNSSEC);2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);2620:fe::10;2620:fe::fe:10
Quad9 (filtered, ECS, DNSSEC);2620:fe::11;2620:fe::fe:11
Cloudflare (DNSSEC);2606:4700:4700::1111;2606:4700:4700::1001'
++ installLogLoc=/etc/pihole/install.log
++ coltable=/opt/pihole/COL_TABLE
++ webroot=/var/www/html
++ webInterfaceGitUrl=https://github.com/pi-hole/web.git
++ webInterfaceDir=/var/www/html/admin
++ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
++ PI_HOLE_LOCAL_REPO=/etc/.pihole
++ PI_HOLE_FILES=(list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
++ PI_HOLE_INSTALL_DIR=/opt/pihole
++ PI_HOLE_CONFIG_DIR=/etc/pihole
++ PI_HOLE_BIN_DIR=/usr/local/bin
++ PI_HOLE_V6_CONFIG=/etc/pihole/pihole.toml
++ fresh_install=true
++ adlistFile=/etc/pihole/adlists.list
++ IPV4_ADDRESS=
++ IPV6_ADDRESS=
++ QUERY_LOGGING=
++ PRIVACY_LEVEL=
++ PIHOLE_INTERFACE=
++ V6_CONF_MIGRATION_DIR=/etc/pihole/migration_backup_v6
++ '[' -z root ']'
++ r=20
++ c=70
+++ cat
++ PIHOLE_META_PACKAGE_CONTROL_APT='Package: pihole-meta
Version: 0.4
Maintainer: Pi-hole team adblock@pi-hole.net
Architecture: all
Description: Pi-hole dependency meta package
Depends: awk,bash-completion,binutils,ca-certificates,cron|cron-daemon,curl,dialog,dnsutils,dns-root-data,git,grep,iproute2,iputils-ping,jq,libcap2,libcap2-bin,lshw,netcat-openbsd,procps,psmisc,sudo,unzip
Section: contrib/metapackages
Priority: optional'
+++ cat
++ PIHOLE_META_PACKAGE_CONTROL_RPM='Name: pihole-meta
Version: 0.2
Release: 1
License: EUPL
BuildArch: noarch
Summary: Pi-hole dependency meta package
Requires: bash-completion,bind-utils,binutils,ca-certificates,chkconfig,cronie,curl,dialog,findutils,gawk,git,grep,iproute,jq,libcap,lshw,nmap-ncat,procps-ng,psmisc,sudo,unzip
%description
Pi-hole dependency meta package
%prep
%build
%files
%install
%changelog

Wed May 28 2025 Pi-hole Team - 0.2

Add gawk to the list of dependencies

Sun Sep 29 2024 Pi-hole Team - 0.1

First version being packaged'
++ repair=false
++ runUnattended=false
++ [[ -f /opt/pihole/COL_TABLE ]]
++ source /opt/pihole/COL_TABLE
+++ '[' -t 1 ']'
++++ tput colors
+++ '[' 8 -ge 8 ']'
+++ COL_BOLD=''
+++ COL_NC=''
+++ COL_GRAY=''
+++ COL_RED=''
+++ COL_GREEN=''
+++ COL_YELLOW=''
+++ COL_BLUE=''
+++ COL_PURPLE=''
+++ COL_CYAN=''
+++ TICK='[✓]'
+++ CROSS='[✗]'
+++ INFO='[i]'
+++ QST='[?]'
+++ OVER='\r'
++ [[ true != true ]]

source /opt/pihole/COL_TABLE
++ '[' -t 1 ']'
+++ tput colors
++ '[' 8 -ge 8 ']'
++ COL_BOLD=''
++ COL_NC=''
++ COL_GRAY=''
++ COL_RED=''
++ COL_GREEN=''
++ COL_YELLOW=''
++ COL_BLUE=''
++ COL_PURPLE=''
++ COL_CYAN=''
++ TICK='[✓]'
++ CROSS='[✗]'
++ INFO='[i]'
++ QST='[?]'
++ OVER='\r'

source /opt/pihole/utils.sh
++ getFTLConfigValue webserver.paths.webroot
++ pihole-FTL --config -q webserver.paths.webroot
++ getFTLConfigValue webserver.paths.webhome
++ pihole-FTL --config -q webserver.paths.webhome

ADMIN_INTERFACE_DIR=/var/www/html/admin/

readonly ADMIN_INTERFACE_DIR

[[ '' == --\c\h\e\c\k-\o\n\l\y ]]

main

local 'basicError=\n  Unable to complete update, please contact Pi-hole Support'

local core_update

local web_update

local FTL_update

core_update=false

web_update=false

FTL_update=false

package_manager_detect

is_command apt-get

local check_command=apt-get

command -v apt-get

PKG_MANAGER=apt-get

UPDATE_PKG_CACHE='apt-get update'

PKG_INSTALL='apt-get -qq --no-install-recommends install'

PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'

PKG_REMOVE='apt-get -y remove --purge'

build_dependency_package

rm -rf '/tmp/pihole-meta_*'

local tempdir
++ mktemp --directory /tmp/pihole-meta_XXXXX

tempdir=/tmp/pihole-meta_3XACE

chmod 0755 /tmp/pihole-meta_3XACE

is_command apt-get

local check_command=apt-get

command -v apt-get

pushd /tmp

rm -f /tmp/pihole-meta.deb

mkdir -p /tmp/pihole-meta_3XACE/DEBIAN

chmod 0755 /tmp/pihole-meta_3XACE/DEBIAN

touch /tmp/pihole-meta_3XACE/DEBIAN/control

echo 'Package: pihole-meta
Version: 0.4
Maintainer: Pi-hole team adblock@pi-hole.net
Architecture: all
Description: Pi-hole dependency meta package
Depends: awk,bash-completion,binutils,ca-certificates,cron|cron-daemon,curl,dialog,dnsutils,dns-root-data,git,grep,iproute2,iputils-ping,jq,libcap2,libcap2-bin,lshw,netcat-openbsd,procps,psmisc,sudo,unzip
Section: contrib/metapackages
Priority: optional'

local 'str=Building dependency package pihole-meta.deb'

printf '  %b %s...' '[i]' 'Building dependency package pihole-meta.deb'
[i] Building dependency package pihole-meta.deb...+ dpkg-deb --build --root-owner-group /tmp/pihole-meta_3XACE pihole-meta.deb

printf '%b  %b %s\n' '\r' '[✓]' 'Building dependency package pihole-meta.deb'
[✓] Building dependency package pihole-meta.deb

popd

rm -rf /tmp/pihole-meta_3XACE

install_dependent_packages

local 'str=Installing Pi-hole dependency package'

printf '  %b %s...' '[i]' 'Installing Pi-hole dependency package'
[i] Installing Pi-hole dependency package...+ is_command apt-get

local check_command=apt-get

command -v apt-get

'[' -f /tmp/pihole-meta.deb ']'

eval 'apt-get -qq --no-install-recommends install' /tmp/pihole-meta.deb

printf '%b  %b %s\n' '\r' '[✗]' 'Installing Pi-hole dependency package'
[✗] Installing Pi-hole dependency package

printf '  %b Error: Unable to install Pi-hole dependency package.\n' ''
Error: Unable to install Pi-hole dependency package.

return 1

Ok, now lets try to install the package manaully. What is the output of

sudo apt-get --no-install-recommends install /tmp/pihole-meta.deb

owner@raspberrypi:~ $ sudo apt-get --no-install-recommends install /tmp/pihole-meta.deb
Reading package lists... Done
E: Unsupported file /tmp/pihole-meta.deb given on commandline

This looks like something!

I think it means the package file does not exist.

What is the output of ls -la /tmp/pihole-meta.deb?

ls: cannot access ‘/tmp/pihole-meta.deb’: No such file or directory

That is strange, because we only remove the package when installation was successful.

What is the output of

ls /tmp/pihole*

and

df -h
owner@raspberrypi:\~ $ ls /tmp/pihole\*
ls: cannot access '/tmp/pihole\*': No such file or directory
owner@raspberrypi:\~ $ df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/root                     29G  9.3G   18G  34% /
devtmpfs                     1.7G     0  1.7G   0% /dev
tmpfs                        1.9G  5.2M  1.9G   1% /dev/shm
tmpfs                        760M  1.2M  759M   1% /run
tmpfs                        1.9G     0  1.9G   0% /tmp
tmpfs                        5.0M   16K  5.0M   1% /run/lock
/dev/mmcblk0p1               253M   56M  197M  23% /boot
log2ram                      512M   46M  467M   9% /var/log
tmpfs                        1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
//192.168.1.250/shared/SYNC  2.7T  2.4T  311G  89% /home/owner/sync
tmpfs                        1.0M     0  1.0M   0% /run/credentials/getty@tty1.service
tmpfs                        380M   44K  380M   1% /run/user/1000

-Marc

Don’t know if this is helpful:

owner@raspberrypi:\~ $ ls /tmp/
systemd-private-7de012391e3141389facaa2705392376-bluetooth.service-bqxTuD
systemd-private-7de012391e3141389facaa2705392376-ModemManager.service-WmKLus
systemd-private-7de012391e3141389facaa2705392376-polkit.service-JbepfF
systemd-private-7de012391e3141389facaa2705392376-rsyslog.service-SKZsjb
systemd-private-7de012391e3141389facaa2705392376-systemd-logind.service-auvgTw
systemd-private-7de012391e3141389facaa2705392376-upower.service-TZXcqO

It's strange. The file does not exist, but must have exist just a second before trying to install it, otherwise the installer would have failed in a different way.

There is also more than enough space in /tmp


Can you try to modify

etc/.pihole/automated\ install/basic-install.sh and remove the &>/dev/null part

This should give us some more output of apt trying to install the package.

When I open that file for editing, what you show as Line 1429, I get as Line 1367. Do we have the same basic-install.sh file?

Also should I remove the semi-colon (;) at the end of &>/dev/null ?

I’m new to a lot of this.

You have an older version of that file, therefore the position is slightly changed due to code added/removed in later versions.

No, this needs to stay.

I had to slightly alter the path. Here is what happened:

owner@raspberrypi:~ $ sudo nano '/etc/.pihole/automated install/basic-install.sh'
owner@raspberrypi:~ $ sudo pihole -up
[✓] Building dependency package pihole-meta.deb
[i] Installing Pi-hole dependency package...

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
[✗] Installing Pi-hole dependency package
Error: Unable to install Pi-hole dependency package.

I then ran apt --fix-broken install which gave me a long output. Ending with:

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
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
Processing triggers for libc-bin (2.41-12+rpt1) ...
Processing triggers for initramfs-tools (0.142+rpt4+deb12u3) ...
Errors were encountered while processing:
raspi-firmware
sense-hat
Error: Sub-process /usr/bin/dpkg returned an error code (1)

Finally I ran sudo apt autoremove which also gave me a long output, which ended in:

Setting up raspi-firmware (1:1.20250915-1) ...
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
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
Processing triggers for fontconfig (2.15.0-2.3) ...
Processing triggers for hicolor-icon-theme (0.18-2) ...
Processing triggers for libc-bin (2.41-12+rpt1) ...
Processing triggers for systemd (257.8-1~deb13u2+rpi1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libglib2.0-0t64:armhf (2.84.4-3~deb13u1) ...
Processing triggers for libreoffice-common (4:25.2.3-2+rpi1+deb13u2) ...
Processing triggers for dbus (1.16.2-2) ...
Processing triggers for shared-mime-info (2.4-5) ...
Processing triggers for udev (257.8-1~deb13u2+rpi1) ...
Processing triggers for install-info (7.1.1-1+b1) ...
Processing triggers for initramfs-tools (0.142+rpt4+deb12u3) ...
Errors were encountered while processing:
raspi-firmware
sense-hat
Error: Sub-process /usr/bin/dpkg returned an error code (1)

Attached is the entire file:

RPI.txt (59.6 KB)

I see a repeated issue with rasp-firmware also I have no HATs installed.

At some point I can completely reinstall everything, but my sense is that you’d like to figure this out.

Thanks for the output.

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
dpkg: dependency problems prevent configuration of sense-hat:
 sense-hat depends on raspi-firmware; however:
  Package raspi-firmware is not configured yet.

This indicates an OS level issue outside of Pi-hole. Probably the best way forward is

can completely reinstall everything,

P.S. Don't forget to make a teleporter backup before wiping everything.

OK will do, thanks for your help with this.

Well I rebuilt my Raspberry Pi.

Started with the RPI Imager and installed Raspberry OS Trixie.

Installed Pi-Hole with the basic “curl” command.

Gave it the same static IP address as the previous build.

I then installed SyncThing and set that up.

SyncThing finished syncing and I rebooted the Pi. I had a small issue with SyncThing which is now fixed. I rebooted again and both Pi-Hole and SyncThing appear to be working fine.

Again, thanks for your help.

-Marc

1 Like