Can't install Pi-Hole v4.0 on Ubuntu Server 18.04

Hello com,

I've just tried to install Pi-Hole on my Ubuntu Server 18-04.
When I run the "curl -sSL https://install.pi-hole.net | bash", it appears followed

[✓] Root user check

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

[✓] Disk space check

[✓] Update local cache of available packages

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

[i] Installer Dependency checks...
[✓] Checking for apt-utils
[i] Checking for dialog (will be installed)
[✓] Checking for debconf
[i] Checking for dhcpcd5 (will be installed)
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail

Then, it abort. The Ubuntu Server is fresh installed.

Could you support me for this issue?

Thank you in advance.
BR
Sascha

Ubuntu 18.04 removes some of the packages that we need for the installation process. dialog and dhcpcd5 are no longer in Ubuntu 18.04, so at this time we are unable to install to that distribution. We are looking at what we need to change to support in the future and will keep users updated as we are able to add that as a supported platform.

3 Likes

Thank you for the info.
If I install the two packages in Ubuntu, would it run?

It should, we'd need to have the install run under verbose mode to check and see what packages are causing the problems. If you'd like to help, curl -sSL https://install.pi-hole.net | sudo bash -x would be good to see.

Here it is

+ set -e
+ installLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ coltable=/opt/pihole/COL_TABLE
+ 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
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ regexFile=/etc/pihole/regex.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ '[' -z root ']'
++ stty size
++ echo 24 80
+ screen_size='24 80'
++ echo '24 80'
++ awk '{print $1}'
+ rows=24
++ echo '24 80'
++ awk '{print $2}'
+ columns=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'
+ echo ''

+ [[ 0 -eq 0 ]]
+ echo -e '  [\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.EQbjgj
+ exec
+ rm /tmp/pihole_temp.EQbjgj
+ distro_check
+ command -v apt-get
+ PKG_MANAGER=apt-get
+ UPDATE_PKG_CACHE='apt-get update'
+ PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ apt-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ command -v php
+ [[ '' != true ]]
+ apt-get install --dry-run php
+ phpVer=php
+ apt-get install --dry-run php-sqlite3
+ phpSqlite=sqlite3
+ INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)
+ PIHOLE_DEPS=(bc cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf)
+ PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite})
+ 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
++ df -Pk
++ grep -m1 '\/$'
++ awk '{print $4}'
+ existing_free_kilobytes=102148344
+ [[ 102148344 =~ ^([0-9])+$ ]]
+ [[ 102148344 -lt 51200 ]]
+ echo -e '  [\e[1;32m✓\e[0m] Disk space check'
  [✓] Disk space check
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ echo ''

+ echo -ne '  [i] Update local cache of available packages...'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Update local cache of available packages'
  [✓] Update local cache of available packages
+ notify_package_updates_available
+ local 'str=Checking apt-get for upgraded packages'
+ echo -ne '\n  [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'
+++ true
+ updatesToInstall=0
++ uname -r
+ [[ -d /lib/modules/4.15.0-30-generic ]]
+ [[ 0 -eq 0 ]]
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking apt-get for upgraded packages... up to date!'
  [✓] Checking apt-get for upgraded packages... up to date!
+ echo ''

+ install_dependent_packages 'INSTALLER_DEPS[@]'
+ counter=1
+ [[ 1 == 1 ]]
+ echo -e '  [i] Installer Dependency checks...'
  [i] Installer Dependency checks...
+ argArray1=("${!1}")
+ declare -a argArray1
+ declare -a installArray
+ command -v debconf-apt-progress
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for apt-utils...'
  [i] Checking for apt-utils...+ dpkg-query -W '-f=${Status}' apt-utils
+ grep 'ok installed'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for apt-utils'
  [✓] Checking for apt-utils
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for dialog...'
  [i] Checking for dialog...+ dpkg-query -W '-f=${Status}' dialog
+ grep 'ok installed'
+ echo -e '\r\033[K  [i] Checking for dialog (will be installed)'
  [i] Checking for dialog (will be installed)
+ installArray+=("${i}")
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for debconf...'
  [i] Checking for debconf...+ dpkg-query -W '-f=${Status}' debconf
+ grep 'ok installed'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for debconf'
  [✓] Checking for debconf
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for dhcpcd5...'
  [i] Checking for dhcpcd5...+ dpkg-query -W '-f=${Status}' dhcpcd5
+ grep 'ok installed'
+ echo -e '\r\033[K  [i] Checking for dhcpcd5 (will be installed)'
  [i] Checking for dhcpcd5 (will be installed)
+ installArray+=("${i}")
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for git...'
  [i] Checking for git...+ dpkg-query -W '-f=${Status}' git
+ grep 'ok installed'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for git'
  [✓] Checking for git
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for iproute2...'
  [i] Checking for iproute2...+ dpkg-query -W '-f=${Status}' iproute2
+ grep 'ok installed'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for iproute2'
  [✓] Checking for iproute2
+ for i in "${argArray1[@]}"
+ echo -ne '  [i] Checking for whiptail...'
  [i] Checking for whiptail...+ dpkg-query -W '-f=${Status}' whiptail
+ grep 'ok installed'
+ echo -e '\r\033[K  [\e[1;32m✓\e[0m] Checking for whiptail'
  [✓] Checking for whiptail
+ [[ 2 -gt 0 ]]
+ test_dpkg_lock
+ i=0
+ fuser /var/lib/dpkg/lock
+ return 0
+ debconf-apt-progress -- apt-get --yes --no-install-recommends install dialog dhcpcd5

Last line: exactly what you said. Ok I'll try to install both packages and I'll inform you.

Edit:
apt-get install dialog dhcpcd5
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paket dialog ist nicht verfügbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfügbar ist.

E: Für Paket »dialog« existiert kein Installationskandidat.
E: Paket dhcpcd5 kann nicht gefunden werden.

Sry, I have my server in german. It says, the packages are not available in my source. Maybe with a different source. I'll check it. Btw dhcpcd5 isn't found

1 Like

Finally I get it work.
I've just added deb http://cz.archive.ubuntu.com/ubuntu bionic main universe to /etc/apt/sources.list
First, it fails again with the install. Next I tried curl -sSL https://install.pi-hole.net | sudo bash -x to look whats the problem is and it runs smoothly til the end.

3 Likes

same solution works for linux Mint 19

Many thanks for that!!!!!!

I was to fast...
Tha Pihole works fine on localhost but not for other clients... no DNS-resolution on other clients. I will open dedicated ticket

my debug token: vqswvwcsxb

additional infos:

  • ssh access works
  • vnc ccess works
  • ping 192.168.1.60 works
  • ping6 fd00::f882:93f5:5f00:6e6f works
    PING6(56=40+8+8 bytes) fd00::d1b9:51cf:27c8:e223 --> fd00::f882:93f5:5f00:6e6f

resolved!
pihole -r as new installation

@DanSchaper I thinks that this should be told to all ... if I have not simply loose this comunication.... I am here, 3 days, fighting against a new installation.....

Please,

  • write a post about how to work around this.
  • Or modify the installer so it fails as soon as possibile if needed pachages are not found
  • explain me,again, please, why some user says that a installation with -r can fix it.
  • so I can patch install to do what the -r do, because all my dns nodes are being created via script

@Mada: what does -r do to fix the problem?

Please, see my actual debugging process here: Pi-Hole is unable to resolve name (Ubuntu 18.04) - #8 by realtebo

pihole -r as new installation fixes propably the binding to the wrong network link. Probbly my mistake before, but I'm unsure.

In my experience, the Ubuntu installation has two major pitfalls to overcome.

  1. the missing packages "dialog" and "dhcpcd5".
    It is helpful to add the entry "deb http://archive.ubuntu.com/ubuntu bionic main" to the "/etc/apt/sources.list" and start the installation with "sudo apt-get --no-install-recommends install dialog dhcpcd5".
  2. to ensure that the installation of pihole is complete.
    If no sources are found, the DNS resolution must be done via external resolvers. To do this, check repeatedly whether e.g. 8.8.8.8 is entered in"/etc/resolv.conf" as nameserver and not 127.0.0.1
    The network manager overwrites the entries again and again, therefore the repeated review.
    After modifying "/etc/resolv.conf", the installation of Pihole should be restarted. If necessary pihole -r as repair installation, pihole -r as new installation. Depending on when the installation was canceled, a pihole -up can also help.

These are my experiences and I got Mint 19 to work with it.

This bionic main is enabled by default in the 18.04., also, the installer itself install these packages.

This the installer code

distro_check() {
# If apt-get is installed, then we know it's part of the Debian family
if command -v apt-get &> /dev/null; then
....

    INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)

So this step is no more needed on Ubuntu. But for Mint 19.. I don't know ..
What does it do in your system the following ?

command -v apt-get

I got

/usr/bin/apt-get

If not, it explain why you need to pre-install prerequisites. I could prepare a PR eventually.

to ensure that the installation of pihole is complete.

I do not understand, do you need a way to programmatically check (using scripts) if the pihole setup is finished and all is gone well?

I got

~# command -v apt-get
/usr/bin/apt-get

No, I can watch the installation log and identify errors like this
[✗] Fetching branches from https://github.com/pi-hole/AdminLTE.git

All my problems are solved, I'm fine.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.