[SOLVED] Installation stuck at "Checking for dnsutils"

non-standard elements:

  • Web Server
    apache2 instead of lighttpd
  • I don't run a fresh installation of raspbian. This installation is years old an was upgraded fom Stretch to Buster to Bullseye. I dont't whant to reinstall it, because i also use this Pi as a internet radio, IR controlled and with a homebrewed web GUI for the radio.

additional information:

I already had a working installation. But it stopped working after some updates. I was no longer able to update the gravity because it stucked at "pending...". So i decided to reinstall it.

Expected Behaviour:

Install script should run fine.
curl -sSL https://install.pi-hole.net | bash
After "Checking for dnsutils" the script should move one.

-operating system
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

-hardware]_
Raspberry Pi Model B Rev 2

Actual Behaviour:

Installation stuck at "Checking for dnsutils".

pi@raspberrypi:~ $ curl -sSL https://install.pi-hole.net | bash

  [i] Root user check
  [i] Script called with non-root privileges
      The Pi-hole requires elevated privileges to install and run
      Please check the installer for any concerns regarding this requirement
      Make sure to download this script from a trusted source

  [✓] Sudo utility check

  [✓] Root user check

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

  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.4.25

  [✓] Checking apt-get for upgraded packages... up to date!

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

... 30min later, nothing happens.

Debug Token:

I'm not able to run "pihole -d" because the installation faild.

What I tried to fix the Problem:

  • Uninstall Pi Hole by the uninstall script. Still stucks at the same point when I try to reinstall it.
  • Purged dnsutils by "sudo apt purge dnsutils". The Pi Hole script reinstalled dnsutils but it stucks after the installation of dnsutils.

*My native language is german.

Update:

When I skip the OS check, the setup will move on. But it will stuck at "Pending..." again.

> pi@raspberrypi:~ $ curl -sSL https://install.pi-hole.net | PIHOLE_SKIP_OS_CHECK=true sudo -E bash
> 
>   [✓] Root user check
> 
>         .;;,.
>         .ccccc:,.
>          :cccclll:.      ..,,
>           :ccccclll.   ;ooodc
>            'ccll:;ll .oooodc
>              .;cll.;;looo:.
>                  .. ','.
>                 .',,,,,,'.
>               .',,,,,,,,,,.
>             .',,,,,,,,,,,,....
>           ....''',,,,,,,'.......
>         .........  ....  .........
>         ..........      ..........
>         ..........      ..........
>         .........  ....  .........
>           ........,,,,,,,'......
>             ....',,,,,,,,,,,,.
>                .',,,,,,,,,'.
>                 .',,,,,,'.
>                   ..'''.
> 
>   [✓] Update local cache of available packages
>   [i] Existing PHP installation detected : PHP version 7.4.25
> 
>   [✓] Checking apt-get for upgraded packages... up to date!
> 
>   [i] Checking for / installing Required dependencies for OS Check...
>   [✓] Checking for grep
>   [✓] Checking for dnsutils
> 
>   [i] PIHOLE_SKIP_OS_CHECK env variable set to true - installer will continue
>   [i] Checking for / installing Required dependencies for this install script...
>   [✓] Checking for git
>   [✓] Checking for iproute2
>   [✓] Checking for whiptail
>   [✓] Checking for ca-certificates
> 
>   [i] SELinux not detected
> 
>   [i] Using interface: wlan0
>   [i] Using upstream DNS: Google (ECS, DNSSEC) (8.8.8.8, 8.8.4.4)
>   [i] IPv4 address: 192.168.10.22/24
>   [i] Static IP already configured
>   [i] Unable to find IPv6 ULA/GUA address
>   [i] IPv6 address:
>   [i] Web Interface On
>   [i] Web Server Off
>   [i] Logging On.
>   [✗] Check for existing repository in /etc/.pihole
>   [i] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole...HEAD is now at b5e0f14 Merge pull request #4405 from pi-hole/development
>   [✓] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole
> 
>   [✗] Check for existing repository in /var/www/html/admin
>   [i] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin...HEAD is now at ee50954 Merge pull request #1935 from pi-hole/devel
>   [✓] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin
> 
>   [i] Checking for / installing Required dependencies for Pi-hole software...
>   [✓] Checking for cron
>   [✓] Checking for curl
>   [✓] Checking for iputils-ping
>   [✓] Checking for lsof
>   [✓] Checking for psmisc
>   [✓] Checking for sudo
>   [✓] Checking for unzip
>   [✓] Checking for idn2
>   [✓] Checking for sqlite3
>   [✓] Checking for libcap2-bin
>   [✓] Checking for dns-root-data
>   [✓] Checking for libcap2
> 
>   [✓] Creating user 'pihole'
> 
>   [i] FTL Checks...
> 
>   [✓] Detected ARMv6 processor (with hard-float support)
>   [i] Checking for existing FTL binary...
>   [✓] Downloading and Installing FTL
>   [✓] Installing scripts from /etc/.pihole
> 
>   [i] Installing configs from /etc/.pihole...
>   [✓] No dnsmasq.conf found... restoring default dnsmasq.conf...
>   [✓] Installed /etc/dnsmasq.d/01-pihole.conf
>   [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf
> 
>   [i] Installing blocking page...
>   [✓] Creating directory for blocking page, and copying files
>   [i] Backing up index.lighttpd.html
>       No default index.lighttpd.html file found... not backing up
> 
>   [✓] Installing sudoer file
> 
>   [✓] Installing latest Cron script
> 
>   [✓] Installing latest logrotate script
>   [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
>   [✓] man pages installed and database updated
>   [i] Testing if systemd-resolved is enabled
>   [i] Systemd-resolved is not enabled
>   [i] Lighttpd is disabled, skipping service restart
>   [i] Restarting services...
>   [✓] Enabling pihole-FTL service to start on reboot...
>   [✓] Restarting pihole-FTL service...
>   [i] Creating new gravity database
>   [i] Migrating content of /etc/pihole/adlists.list into new database
>   [✓] Deleting existing list cache
>   [i] Neutrino emissions detected...
>   [✓] Pulling blocklist source list into range
> 
>   [✓] Preparing new gravity database
>   [i] Using libz compression
> 
>   [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
>   [i] Status: Pending...

Only when I press Ctr+C the setup will continue.

  [i] Status: Pending...^C

  [i] User-abort detected
  [✓] Cleaning up stray matter
  [✓] DNS service is listening
     [✓] UDP (IPv4)
     [✓] TCP (IPv4)
     [✓] UDP (IPv6)
     [✓] TCP (IPv6)

  [i] Pi-hole blocking will be enabled
  [i] Enabling blocking
  [✓] Reloading DNS lists
  [✓] Pi-hole Enabled

Run the following, then repeat the Pi-hole installer:

sudo apt install dnsutils

Thanks for your answer, unfortunately it didn't work. The problem is still there.

pi@raspberrypi:~ $ sudo apt install dnsutils

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

dnsutils is already the newest version (1:9.16.22-1~deb11u1).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~/Pi-hole/automated install $ sudo bash basic-install.sh

  [✓] Root user check

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

  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.4.25

  [✓] Checking apt-get for upgraded packages... up to date!

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

Please post the output of a verbose version of the installer.

curl -sSL https://install.pi-hole.net | sudo bash -x

pi@raspberrypi:~ $ curl -sSL https://install.pi-hole.net | sudo bash -x
+ 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
++ 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;;
DNS.WATCH (DNSSEC);84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
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'
+ installLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ coltable=/opt/pihole/COL_TABLE
+ webroot=/var/www/html
+ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+ webInterfaceDir=/var/www/html/admin
+ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+ PI_HOLE_LOCAL_REPO=/etc/.pihole
+ PI_HOLE_FILES=(chronometer 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_BLOCKPAGE_DIR=/var/www/html/pihole
+ '[' -z '' ']'
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ PRIVACY_LEVEL=0
+ CACHE_SIZE=10000
+ '[' -z root ']'
+ r=20
+ c=70
+ reconfigure=false
+ runUnattended=false
+ INSTALL_WEB_SERVER=true
+ [[ -f /opt/pihole/COL_TABLE ]]
+ COL_NC='\e[0m'
+ COL_LIGHT_GREEN='\e[1;32m'
+ COL_LIGHT_RED='\e[1;31m'
+ TICK='[\e[1;32m✓\e[0m]'
+ CROSS='[\e[1;31m✗\e[0m]'
+ INFO='[i]'
+ DONE='\e[1;32m done!\e[0m'
+ OVER='\r\033[K'
+ [[ '' != true ]]
+ main
+ local 'str=Root user check'
+ printf '\n'

+ [[ 0 -eq 0 ]]
+ printf '  %b %s\n' '[\e[1;32m✓\e[0m]' 'Root user check'
  [✓] Root user check
+ show_ascii_berry
+ echo -e '
        \e[1;32m.;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           '\''ccll:;ll .oooodc
             .;cll.;;looo:.
                 \e[1;31m.. '\'','\''.
                .'\'',,,,,,'\''.
              .'\'',,,,,,,,,,.
            .'\'',,,,,,,,,,,,....
          ....'\'''\'''\'',,,,,,,'\''.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'\''......
            ....'\'',,,,,,,,,,,,.
               .'\'',,,,,,,,,'\''.
                .'\'',,,,,,'\''.
                  ..'\'''\'''\''.\e[0m
'

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

+ make_temporary_log
++ mktemp /tmp/pihole_temp.XXXXXX
+ TEMPLOG=/tmp/pihole_temp.rXgs9r
+ exec
+ rm /tmp/pihole_temp.rXgs9r
+ 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=("${PKG_MANAGER}" -qq --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ printf '  %b %s...' '[i]' 'Update local cache of available packages'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' 'Update local cache of available packages'
  [✓] Update local cache of available packages
+ local phpVer=php
+ is_command php
+ local check_command=php
+ command -v php
++ php
+ printf '  %b Existing PHP installation detected : PHP version %s\n' '[i]' 7.4.25
  [i] Existing PHP installation detected : PHP version 7.4.25
++ php
+ printf -v phpInsMajor %d 7
++ php
+ printf -v phpInsMinor %d 4
+ phpVer=php7.4
+ OS_CHECK_DEPS=(grep dnsutils)
+ INSTALLER_DEPS=(git iproute2 whiptail ca-certificates)
+ PIHOLE_DEPS=(cron curl iputils-ping lsof psmisc sudo unzip idn2 sqlite3 libcap2-bin dns-root-data libcap2)
+ PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-sqlite3" "${phpVer}-xml" "${phpVer}-intl")
+ [[ -z 7 ]]
+ [[ 7 -lt 8 ]]
+ PIHOLE_WEB_DEPS+=("${phpVer}-json")
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ notify_package_updates_available
+ local 'str=Checking apt-get for upgraded packages'
+ printf '\n  %b %s...' '[i]' 'Checking apt-get for upgraded packages'

  [i] Checking apt-get for upgraded packages...++ eval 'apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+++ grep -c '^Inst'
+ updatesToInstall=2
++ uname -r
+ [[ -d /lib/modules/5.10.63+ ]]
+ [[ 2 -eq 0 ]]
+ printf '%b  %b %s... %s updates available\n' '\r\033[K' '[\e[1;32m✓\e[0m]' 'Checking apt-get for upgraded packages' 2
  [✓] Checking apt-get for upgraded packages... 2 updates available
+ printf '  %b %bIt is recommended to update your OS after installing the Pi-hole!%b\n\n' '[i]' '\e[1;32m' '\e[0m'
  [i] It is recommended to update your OS after installing the Pi-hole!

+ printf '  %b Checking for / installing Required dependencies for OS Check...\n' '[i]'
  [i] Checking for / installing Required dependencies for OS Check...
+ install_dependent_packages grep dnsutils
+ declare -a installArray
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' grep
  [i] Checking for grep...+ dpkg-query -W '-f=${Status}' grep
+ grep 'ok installed'
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' grep
  [✓] Checking for grep
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dnsutils
  [i] Checking for dnsutils...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dnsutils
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' dnsutils
  [✓] Checking for dnsutils
+ [[ 0 -gt 0 ]]
+ printf '\n'

+ return 0
+ os_check
+ '[' '' '!=' true ']'
+ local remote_os_domain valid_os valid_version valid_response detected_os detected_version display_warning cmdResult digReturnCode response
+ remote_os_domain=versions.pi-hole.net
++ grep '\bID\b' /etc/os-release
++ cut -d = -f2
++ tr -d '"'
+ detected_os=raspbian
++ grep VERSION_ID /etc/os-release
++ cut -d = -f2
++ tr -d '"'
+ detected_version=11
++ dig +short -t txt versions.pi-hole.net @ns1.pi-hole.net

When I run htop, I can see dig +short -t txt versions.pi-hole.net @ns1.pi-hole.net with a high CPU usage.

Are you perhaps running unbound as Pi-hole's upstream DNS server?

Run from your RPi, what's the output of the following commands:

dig ns1.pi-hole.net
dig ns1.pi-hole.net @8.8.8.8
cat /etc/resolv.conf
df -h

Not that I know. In any case, I didn't consciously set up unbound as Pi-hole's upstream DNS server. To be honest, I don't know what "unbound" is supposed to be.

pi@raspberrypi:~ $ dig ns1.pi-hole.net
^C
pi@raspberrypi:~ $

I canceled after 5 minutes because nothing happened.

pi@raspberrypi:~ $ dig ns1.pi-hole.net @8.8.8.8
^C
pi@raspberrypi:~ $

I canceled this also after 5 minutes because nothing happened.

pi@raspberrypi:~ $ cat /etc/resolv.conf
# Generated by resolvconf
domain fritz.box
nameserver 192.168.10.1
pi@raspberrypi:~ $
pi@raspberrypi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.1G  3.2G  3.7G  46% /
devtmpfs        183M     0  183M   0% /dev
tmpfs           216M     0  216M   0% /dev/shm
tmpfs            87M  616K   86M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/mmcblk0p1   63M   41M   23M  65% /boot
tmpfs            43M   20K   43M   1% /run/user/1000
pi@raspberrypi:~ $

I found out that dig belongs to the bind9-dnsutils package. So I reinstalled it (apt purge bind9-dnsutils && apt install bind9-dnsutils). However, dig seems to be completely broken. Not even dig -v works.

pi@raspberrypi:~ $ type -p dig
/usr/bin/dig
pi@raspberrypi:~ $ dpkg -S /usr/bin/dig
bind9-dnsutils: /usr/bin/dig
pi@raspberrypi:~ $
pi@raspberrypi:~ $ dig -v
^C
pi@raspberrypi:~ $

This is not good and might indicate file system issues. The reason might be

Even if you don't want to, your only option might be to


You could try to setup the system on a fresh SD card and see if the error persists.

@ 5h4rk1337 (OP), I have the same hardware as you (Raspberry Pi Model B Rev 2) and had the exact same problem as you. I had just done a fresh install of Raspberry Pi OS bullseye and got the same result as you. I fixed it by going back to Raspbian Stretch:

https://downloads.raspberrypi.org/raspbian/images/raspbian-2019-04-09/2019-04-08-raspbian-stretch.zip

... and then the automated install script worked just fine:
curl -sSL https://install.pi-hole.net | bash

I have no idea why it works on Stretch, but, it does.

By default, Raspberry Pi OS Bullseye (Oct 2021 release, Lite) installs bind9-dnsutils.

sudo apt list --installed
...
bind9-dnsutils/stable,now 1:9.16.22-1~deb11u1 armhf [installed,automatic]

Pi-hole installs dnsutils:

dnsutils/stable,now 1:9.16.22-1~deb11u1 all [installed]

Thank you all for your replies.
I solved this problem by using a new SD card and an older backup of my setup based on Stretch. I upgraded everything and restored my last configurations. Everything works fine now :slight_smile: