Pihole won't install (no errors, stops after dependencies)

Scenario:

  • vmware esxi 6.7, 1 vCPU, 1GB RAM, 8GB HDD
  • Debian 10.4 (both netinstall and DVD isos)
  • Minimum install: SSH Server, Standard System Utilities... (no desktop at all)
  • Had to add: sudo, curl
  • sudo -i
  • Executed: curl -sSL https://install.pi-hole.net | bash

Result:

root@pihole-a:~# curl -sSL https://install.pi-hole.net | bash

  [✓] Root user check

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

  [✓] Update local cache of available packages
  [✓] Disk space check

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

  [i] Installer Dependency checks...
  [i] Checking for dhcpcd5 (will be installed)
  [i] Checking for git (will be installed)
  [✓] Checking for iproute2
  [✓] Checking for whiptail
  [i] Checking for dnsutils (will be installed)
  [i] Processing apt-get install(s) for: dhcpcd5 git dnsutils, please wait...
--------------------------------------------------------------------------------
Selecting previously unselected package dhcpcd5.
(Reading database ... 29341 files and directories currently installed.)
Preparing to unpack .../0-dhcpcd5_7.1.0-2_amd64.deb ...
Unpacking dhcpcd5 (7.1.0-2) ...
Selecting previously unselected package libirs161:amd64.
Preparing to unpack .../1-libirs161_1%3a9.11.5.P4+dfsg-5.1+deb10u1_amd64.deb ...
Unpacking libirs161:amd64 (1:9.11.5.P4+dfsg-5.1+deb10u1) ...
Selecting previously unselected package dnsutils.
Preparing to unpack .../2-dnsutils_1%3a9.11.5.P4+dfsg-5.1+deb10u1_amd64.deb ...
Unpacking dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u1) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../3-liberror-perl_0.17027-2_all.deb ...
Unpacking liberror-perl (0.17027-2) ...
Selecting previously unselected package git-man.
Preparing to unpack .../4-git-man_1%3a2.20.1-2+deb10u3_all.deb ...
Unpacking git-man (1:2.20.1-2+deb10u3) ...
Selecting previously unselected package git.
Preparing to unpack .../5-git_1%3a2.20.1-2+deb10u3_amd64.deb ...
Unpacking git (1:2.20.1-2+deb10u3) ...
Setting up dhcpcd5 (7.1.0-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dhcpcd.service → /lib/systemd/system/dhcpcd.service.
Setting up libirs161:amd64 (1:9.11.5.P4+dfsg-5.1+deb10u1) ...
Setting up dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u1) ...
Setting up liberror-perl (0.17027-2) ...
Setting up git-man (1:2.20.1-2+deb10u3) ...
Setting up git (1:2.20.1-2+deb10u3) ...
Processing triggers for systemd (241-7~deb10u4) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
--------------------------------------------------------------------------------
root@pihole-a:~# pihole
-bash: pihole: command not found
root@pihole-a:~# find / -name "*pihole*"
root@pihole-a:~#

Dug into script... tried manually installing dependencies from script: cron curl iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2 lighttpd php-common php-cgi php-sqlite3 php-xml php-intl ... Still no further progress. Script ends after successfully checking for initial dependencies.

  [i] Installer Dependency checks...
  [✓] Checking for dhcpcd5
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for whiptail
  [✓] Checking for dnsutils

root@pihole-a:~#

Result of apt list | grep installed before manual dependency installs: https://pastebin.com/raw/fm6cw3zW (big chunk of text so in pastebin)

Debug Token:

Cannot generate a debug token

1 Like

Please run the installer in verbose mode and post the output here:

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

root@pihole-a:~# curl -sSL https://install.pi-hole.net | sudo bash -x
+ set -e
++ cat
+ DNS_SERVERS='Google (ECS);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);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;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);9.9.9.11;149.112.112.11;2620:fe::11;
Cloudflare;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
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ PRIVACY_LEVEL=0
+ '[' -z root ']'
+ '[' -t 0 ']'
+ screen_size='24 80'
+ printf -v rows %d 24
+ printf -v columns %d 80
+ r=12
+ c=40
+ r=20
+ c=70
+ skipSpaceCheck=false
+ 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'
+ counter=0
+ [[ '' != 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.7kiq6t
+ exec
+ rm /tmp/pihole_temp.7kiq6t
+ distro_check
+ 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'
+ APT_SOURCES=/etc/apt/sources.list
+ awk 'BEGIN{a=1;b=0}/bionic main/{a=0}/bionic.*universe/{b=1}END{exit a + b}' /etc/apt/sources.list
+ 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
+ apt-cache show iproute2
+ iproute_pkg=iproute2
+ is_command php
+ local check_command=php
+ command -v php
++ php
+ printf '  %b Existing PHP installation detected : PHP version %s\n' '[i]' 7.3.19-1~deb10u1
  [i] Existing PHP installation detected : PHP version 7.3.19-1~deb10u1
++ php
+ printf -v phpInsMajor %d 7
++ php
+ printf -v phpInsMinor %d 3
+ '[' 7 -ge 7 ']'
+ phpInsNewer=true
+ [[ true != true ]]
+ phpVer=php7.3
+ apt-cache show php7.3-sqlite3
+ phpSqlite=sqlite3
+ INSTALLER_DEPS=(dhcpcd5 git "${iproute_pkg}" whiptail dnsutils)
+ PIHOLE_DEPS=(cron curl iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2)
+ PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-${phpSqlite}" "${phpVer}-xml" "${phpVer}-intl")
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ [[ -f /etc/pihole/setupVars.conf ]]
+ [[ false == true ]]
+ verifyFreeDiskSpace
+ local 'str=Disk space check'
+ local required_free_kilobytes=51200
+ local existing_free_kilobytes
++ awk '{print $4}'
++ grep -m1 '\/$'
++ df -Pk
+ existing_free_kilobytes=5593896
+ [[ 5593896 =~ ^([0-9])+$ ]]
+ [[ 5593896 -lt 51200 ]]
+ printf '  %b %s\n' '[\e[1;32m✓\e[0m]' 'Disk space check'
  [✓] Disk space check
+ 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'
+++ grep -c '^Inst'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+++ true
+ updatesToInstall=0
++ uname -r
+ [[ -d /lib/modules/4.19.0-9-amd64 ]]
+ [[ 0 -eq 0 ]]
+ printf '%b  %b %s... up to date!\n\n' '\r\033[K' '[\e[1;32m✓\e[0m]' 'Checking apt-get for upgraded packages'
  [✓] Checking apt-get for upgraded packages... up to date!

+ install_dependent_packages dhcpcd5 git iproute2 whiptail dnsutils
+ counter=1
+ [[ 1 == 1 ]]
+ printf '  %b Installer Dependency checks...\n' '[i]'
  [i] Installer Dependency checks...
+ 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]' dhcpcd5
  [i] Checking for dhcpcd5...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dhcpcd5
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' dhcpcd5
  [✓] Checking for dhcpcd5
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' git
  [i] Checking for git...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' git
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' git
  [✓] Checking for git
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' iproute2
  [i] Checking for iproute2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iproute2
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' iproute2
  [✓] Checking for iproute2
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' whiptail
  [i] Checking for whiptail...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' whiptail
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' whiptail
  [✓] Checking for whiptail
+ 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
+ local remote_os_domain valid_os valid_version detected_os_pretty detected_os detected_version display_warning
+ remote_os_domain=versions.pi-hole.net
+ valid_os=false
+ valid_version=false
+ display_warning=true
++ tr -d '"'
++ cut -d = -f2-
++ grep PRETTY_NAME
++ cat /etc/os-release
+ detected_os_pretty='Debian GNU/Linux 10 (buster)'
+ detected_os=Debian
++ tr -d '"'
++ cut -d = -f2-
++ grep VERSION_ID
++ cat /etc/os-release
+ detected_version=10
+ IFS=' '
+ read -r -a supportedOS
++ tr -d '"'
++ dig +short -t txt versions.pi-hole.net
root@pihole-a:~#

What does that result in?

So, looking at that...

root@pihole-a:~# dig +short -t txt versions.pi-hole.net
root@pihole-a:~# dig -t txt versions.pi-hole.net

; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> -t txt versions.pi-hole.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 44059
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: dab027e5c99b7be9 (echoed)
;; QUESTION SECTION:
;versions.pi-hole.net.          IN      TXT

;; Query time: 0 msec
;; SERVER: 192.168.33.205#53(192.168.33.205)
;; WHEN: Sat Jul 18 15:24:04 EDT 2020
;; MSG SIZE  rcvd: 61

root@pihole-a:~#

Looking at 192.168.33.205 (another pihole):
2020-07-18 15:24:04 TXT versions.pi-hole.net pihole-a OK (forwarded) upstream error

What are you using as the upstream? What's at 192.168.33.205?

status: FORMERR is the problem.

Another pihole.

Okay, what is that Pi-hole using as an upstream and how did that Pi-hole install correctly?

From another host on the same segment (Ubuntu) which used the same 192.168.33.205 pihole:

root@pphost236:~# dig +short -t txt versions.pi-hole.net
"Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"
root@pphost236:~# dig -t txt versions.pi-hole.net

; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> -t txt versions.pi-hole.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11112
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;versions.pi-hole.net.          IN      TXT

;; ANSWER SECTION:
versions.pi-hole.net.   48      IN      TXT     "Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sat Jul 18 19:30:27 UTC 2020
;; MSG SIZE  rcvd: 127

root@pphost236:~#

2020-07-18 15:30:17 TXT versions.pi-hole.net pphost236 OK (forwarded) N/A

Does dig -t txt +e noedns versions.pi-hole.net work?

root@pihole-a:~# dig -t txt +e noedns versions.pi-hole.net
Invalid option: +e
Usage:  dig [@global-server] [domain] [q-type] [q-class] {q-opt}
            {global-d-opt} host [@local-server] {local-d-opt}
            [ host [@local-server] {local-d-opt} [...]]

Use "dig -h" (or "dig -h | more") for complete list of options
root@pihole-a:~#

Okay, just the dig -t txt +noedns versions.pi-hole.net then.

Every time I do the dig for the txt record from only this new installation I get an upstream error

That worked:

root@pihole-a:~# dig -t txt +noedns versions.pi-hole.net

; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> -t txt +noedns versions.pi-hole.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13245
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;versions.pi-hole.net.          IN      TXT

;; ANSWER SECTION:
versions.pi-hole.net.   59      IN      TXT     "Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"

;; Query time: 90 msec
;; SERVER: 192.168.33.205#53(192.168.33.205)
;; WHEN: Sat Jul 18 15:38:05 EDT 2020
;; MSG SIZE  rcvd: 116

root@pihole-a:~#

Yes, it looks like Debian 10 is using DNS cookies, and Ubuntu isn't so the upstream isn't configured correctly to handle that.

1 Like

Should I make a local copy of the install script and modify that line?

No, fix the upstream to correctly handle cookies.

Pi-hole does it fine.

Cookies forced on:

dschaper@nanopi-r2s:~$ dig -t txt +edns versions.pi-hole.net

; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> -t txt +edns versions.pi-hole.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45388
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 84782386cd6f3d331b5ea19e5f134fdf923f11eec1ef353e (good)
;; QUESTION SECTION:
;versions.pi-hole.net.          IN      TXT

;; ANSWER SECTION:
versions.pi-hole.net.   60      IN      TXT     "Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"

;; Query time: 142 msec
;; SERVER: 192.168.88.5#53(192.168.88.5)
;; WHEN: Sat Jul 18 19:39:11 UTC 2020
;; MSG SIZE  rcvd: 155

So the DNS goes as follows:

Client -> pihole -> Windows AD integrated DNS (2008R2) -> Sophos UTM -> Google

Not sure how to fix ... or maybe just move to Ubuntu as pihole base?

It's the AD DNS server.

Note the size of your ENDS udp packet vs mine. It could be the Sophos as well but I'd assume there would be logs showing the udp packet oversize drop.

Edit:

Yours

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494

Mine

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096