Cannot install Pi-Hole

I've used local en_CA.UTF-8 UTF-8 but i will try with yours.

pi@raspberrypi:~ $ sudo raspi-config

Current default time zone: 'US/Eastern'
Local time is now:      Tue Dec  3 21:50:52 EST 2019.
Universal Time is now:  Wed Dec  4 02:50:52 UTC 2019.

Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
pi@raspberrypi:~ $

here where is bug again

[βœ“] Enabling lighttpd service to start on reboot...

  [i] FTL Checks...

  [βœ“] Detected ARM-hf architecture (armv6 or lower) Using ARM binary
  [i] Checking for existing FTL binary...
  [βœ—] Downloading and Installing FTL
  Error: Unable to get latest release location from GitHub
  [βœ—] FTL Engine not installed

Second try by using this command
sudo tee /etc/resolv.conf <<< 'nameserver 8.8.8.8'

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

Same problem different message but i waiting a lots before getting error

  [i] FTL Checks...

  [βœ“] Detected ARM-hf architecture (armv6 or lower) Using ARM binary
  [i] Checking for existing FTL binary...
  [i] Downloading and Installing FTL...curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
  [βœ—] Downloading and Installing FTL
  Error: URL https://github.com/pi-hole/FTL/releases/download/v4.3.1/pihole-FTL-arm-linux-gnueabi not found
  [βœ—] FTL Engine not installed

and pihole command not working in this case

What are you using for a power supply to this Zero?

The one that came with the kit on canakit dot com.

1 amp power supply

Is this the only Pi you have available? To rule out a hardware problem, it would be a good check to repeat the process on a different piece of hardware.

I ordered a new pi but i wont have it for month, but i got lots of powersupply

Then swap the power supply for the most powerful one you have.

If a fresh image already is subject to repeating rewrites to resolv.conf, the reason might be external to the Pi-hole machine.

The DHCP client could force a change to resolv.conf on DHCP lease renewal. Maybe you've setup a very short lease time.
What is the current lease time as provided by your router, @MrGoatastic ?

If DHCP lease renewal is not the cause, you could try supplying 8.8.8.8 as a fallback static domain server:
sudo nano /etc/dhcpcd.conf

Find a line like this in the fall back section:

# It is possible to fall back to a static IP if DHCP fails:
(...)
#static domain_name_servers=192.168.2.1

Uncomment and add 8.8.8.8 to it

static domain_name_servers=192.168.2.1 8.8.8.8

Saving this should make these servers appear in resolv.conf, as long as our unknown offender uses resolvconf to trigger a /etc/resolv.conf rewrite.

Regardless of the outcome, don't forget to re-comment that line once you've finished testing.

Sadly, no. The problem only appear after the first pihole installation try.

3 day by default

After the change of dchpcd.conf, resolv.conf didn't change. and after i change the /etc/resolv.conf push the command for install. it still lose its connection at the ftl installation part

That rules out DHCP lease renewal as a cause for the rewrite.
I'm out of ideas as to what's causing this...

As another attempt ot preserve a public DNS server during installation, you could try altering resolvconf's default settings:

 sudo nano /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8

Exit with saving, then restart resolvconf:

sudo systemctl restart resolvconf.service

Check contents of resolv.conf to verify this worked:

cat /etc/resolv.conf

To be sure, reboot your Pi-hole machine and double check.
If your public DNS server is still present in resolv.conf, you're ready to retry Pi-hole's installation script again.

EDIT:
Don't forget to remove your public DNS server from /etc/resolvconf/resolv.conf.d/head once you're done.

3 Likes

From my own experience, this could be the problem. I have a couple of Pogoplug Pros that are armv6 and run Debian Stretch. I've long used them to run Pi-hole. Around the time of version 4.0 they would no longer work when trying to upgrade. The installation would fail when trying to install FTL. What I did was follow this guide to compile it from source:

https://docs.pi-hole.net/ftldns/compile/

Since going this route things have worked as expected.

I typed up below but maybe first try @Bucking_Horn method with resolvconf.

Lets see if we can get it running anyway.

nameserver hack first:

sudo tee /etc/resolv.conf <<< $'nameserver 8.8.8.8'

Get the binary (correct one this time :wink: ):

sudo wget https://github.com/pi-hole/FTL/releases/download/v4.3.1/pihole-FTL-arm-linux-gnueabi -O /usr/bin/pihole-FTL

sudo chmod +x /usr/bin/pihole-FTL

Get the init.d script that should start the pihole-FTL binary as a systemd service:

sudo curl -s https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/Templates/pihole-FTL.service -o /etc/init.d/pihole-FTL

sudo chmod +x /etc/init.d/pihole-FTL

Make sure the pihole user exists:

sudo useradd -d /home/pihole -s /usr/sbin/nologin pihole

Create temporary basic config file to supply upstream DNS server:

sudo tee /etc/dnsmasq.conf <<< $'server=8.8.8.8'

Start here up:

sudo bash -x /etc/init.d/pihole-FTL restart

Check if its resolving Github:

host github.com localhost

Run the install script to get rest of the files:

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

If install script fails at some point, try run repair (might need nameserver hack):

pihole -r

Stop pihole-FTL:

sudo bash -x /etc/init.d/pihole-FTL stop

Default below file again:

sudo tee /etc/dnsmasq.conf <<< $'conf-dir=/etc/dnsmasq.d'

Start here up using systemd:

sudo service pihole-FTL restart

And test:

pihole status

sudo service pihole-FTL status

host pi.hole localhost

host github.com localhost

Reboot:

sudo reboot

EDIT: Noticed mistake
EDIT2: I forgot the pihole user
EDIT3: Forgot dependency of config file

EDIT4: Thinking ... it would be easier to just install dnsmasq and disable dnsmasq after Pi-hole is installed :smiley:
Added advantage, you get the dnsmasq man pages installed as well :wink:

This is the exact outcome that I am getting whenever I try to install Pi-hole onto my Raspberry Pi Zero W. Here is my forum on the issue:

https://discourse.pi-hole.net/t/ftl-fails-to-download/25739/2

Try below first:

Could try below after:

Yes, that where my post originated but they splitted us to work better on each case. If i get a way yo install it i will let you know!

I will test all those new command this evening when im home.

What if i manually Download FTL first. Install Pihole ( this way give me access to pihole command ) and remove FTl manually and philoe -r after ?

Yeah better split up at first as most of the times, issues are not the same.
But your cases appear to be the same issue.

Downloading FTL alone will not prevent resolv.conf from being changed to localhost.
If FTL isn't listening/started on localhost 127.0.0.1, all the instructions in the installation script and pihole -r depending on DNS resolution will fail.

I tried the second option first, and it worked! At least I think it did. Everything I think installed fine, and I was able to access my Admin Webpage (by the way how do I change my admin webpage password? It gave me some random password after the install finished). I tried setting up my iPhone to point to my Raspberry Pi’s DNS, but it doesn’t seem to be blocking ads. Are there extra commands that I need to do or things that I need to change after installing? Thank you very much for the help and I’m glad that I have finally made some progress.

1 Like

it'S test time

at my surprise it was empty, was it suposed to ?

but THIS THIIIIISSSS THISSSS fixed the installation ! it finally went completed.

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

  [βœ“] Root user check

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

  [i] Existing PHP installation detected : PHP version 7.3.11-1~deb10u1
  [βœ“] 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
  [βœ“] Checking for dialog
  [βœ“] Checking for debconf
  [βœ“] Checking for dhcpcd5
  [βœ“] Checking for git
  [βœ“] Checking for iproute2
  [βœ“] Checking for whiptail

  [i] Using Google (ECS)
  [i] Static IP already configured
  [i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled
  [i] IPv4 address: 192.168.2.42/24
  [i] IPv6 address:
  [i] Web Interface On
  [i] Web Server On
  [i] Logging On.
  [βœ“] Check for existing repository in /etc/.pihole
  [βœ“] Update repo in /etc/.pihole

  [βœ“] Check for existing repository in /var/www/html/admin
  [βœ“] Update repo in /var/www/html/admin

  [i] Main Dependency checks...
  [βœ“] Checking for cron
  [βœ“] Checking for curl
  [βœ“] Checking for dnsutils
  [βœ“] Checking for iputils-ping
  [βœ“] Checking for lsof
  [βœ“] Checking for netcat
  [βœ“] Checking for psmisc
  [βœ“] Checking for sudo
  [βœ“] Checking for unzip
  [βœ“] Checking for wget
  [βœ“] Checking for idn2
  [βœ“] Checking for sqlite3
  [βœ“] Checking for libcap2-bin
  [βœ“] Checking for dns-root-data
  [βœ“] Checking for resolvconf
  [βœ“] Checking for libcap2
  [βœ“] Checking for lighttpd
  [βœ“] Checking for php7.3-common
  [βœ“] Checking for php7.3-cgi
  [βœ“] Checking for php7.3-sqlite3

  [βœ“] Enabling lighttpd service to start on reboot...

  [i] FTL Checks...

  [βœ“] Detected ARM-hf architecture (armv6 or lower) Using ARM binary
  [i] Checking for existing FTL binary...
  [βœ“] Downloading and Installing FTL
  [βœ“] Creating user 'pihole'
  [βœ“] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [βœ“] No dnsmasq.conf found... restoring default dnsmasq.conf...
  [βœ“] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

  [i] Installing blocking page...
  [βœ“] Creating directory for blocking page, and copying files
  [βœ—] 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

  [i] Skipping firewall configuration
  [βœ“] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [βœ“] Restarting lighttpd service...
  [βœ“] Enabling lighttpd service to start on reboot...
  [i] Restarting services...
  [βœ“] Enabling pihole-FTL service to start on reboot...
  [βœ“] Restarting pihole-FTL service...
  [βœ“] Deleting existing list cache
  [i] Pi-hole blocking is enabled
  [i] Neutrino emissions detected...
  [βœ“] Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [βœ“] Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [βœ“] Status: Retrieval successful

  [i] Target: sysctl.org (hosts)
  [βœ“] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [βœ“] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [βœ“] Status: Retrieval successful

  [i] Target: hosts-file.net (ad_servers.txt)
  [βœ“] Status: Retrieval successful

  [βœ“] Consolidating blocklists
  [βœ“] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 139059
  [βœ“] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 116839
  [i] Nothing to whitelist!
  [i] Number of regex filters: 0
  [βœ“] Parsing domains into hosts format
  [βœ“] Cleaning up stray matter

  [βœ“] Force-reloading DNS service
  [βœ“] DNS service is running
  [i] Pi-hole blocking will be enabled
  [i] Enabling blocking
  [βœ“] Reloading DNS service
  [βœ“] Pi-hole Enabled
  [i] Web Interface password: mT_CLEpZ
  [i] This can be changed using 'pihole -a -p'

  [i] View the web interface at http://pi.hole/admin or http://192.168.2.42/admin

  [i] You may now configure your devices to use the Pi-hole as their DNS server
  [i] Pi-hole DNS (IPv4): 192.168.2.42
  [i] If you set a new IP address, please restart the server running the Pi-hole

  [i] The install log is located at: /etc/pihole/install.log
Installation Complete!

pi@raspberrypi:~ $ pihole status
[βœ“] DNS service is running
[βœ“] Pi-hole blocking is Enabled

I am soooooo happy, wife may even get treats :wink:

Pi-Hole is Up and Running. !!!

1 Like

Time to pushing it as DNS for router !

On a new Raspbian image, I would expect the head file to contain the first two lines - just comments without any functional effect, so an empty file should result in the same behaviour.
My addition was the nameserver line.

And now that Pi-hole is running, make sure Γ½ou remove that line and restart:

If you leave that line in, a good share of your DNS queries might use that nameserver instead of Pi-hole.

Grrreat it's working for you :slight_smile:

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