Cannot install pi-hole on RPi 3 [SOLVED]

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

Expected Behaviour:

pi-hole being installed

Actual Behaviour:

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

Debug Token:

I execute curl -sSL https://install.pi-hole.net | bash
............................
::: Your system is up to date! Continuing with Pi-hole installation...
::: Checking for apt-utils... installed!
::: Checking for dialog... installed!
::: Checking for debconf... installed!
::: Checking for dhcpcd5... installed!
::: Checking for git... added to install list!
::: Checking for iproute2... installed!
::: Checking for whiptail... installed!

than I see progress animation 0% for a moment and returning to terminal.

apt-get update & apt-get update dont resolve the problem

What is the output from sudo apt-get update? Does it successfully complete or does it show any errors?

Thanks for your response

Firstly I cant download pi-hole using command curl -sSL https://install.pi-hole.net | bash. After this command I saw
!!! ERROR - Unable to update package cache. Please try “apt-get update”

apt-get update leads to
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Ign http://giteduberger.fr rpimonitor/ InRelease
Hit http://giteduberger.fr rpimonitor/ Release.gpg
Hit http://giteduberger.fr rpimonitor/ Release
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://giteduberger.fr rpimonitor/ Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://giteduberger.fr rpimonitor/ Translation-en_GB
Ign http://giteduberger.fr rpimonitor/ Translation-en
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/InRelease Unable to find expected entry 'universe/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.

Then I opened /etc/apt/sources.list and made all lines commented (solution from this post ERROR - Unable to update package cache):
#deb Index of /raspbian jessie main universe contrib non-free rpi
#Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
#deb-src Index of /raspbian/ jessie main contrib non-free rpi

After this
sudo apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Ign http://giteduberger.fr rpimonitor/ InRelease
Hit http://giteduberger.fr rpimonitor/ Release.gpg
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://giteduberger.fr rpimonitor/ Release
Hit http://giteduberger.fr rpimonitor/ Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://giteduberger.fr rpimonitor/ Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://giteduberger.fr rpimonitor/ Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Reading package lists… Done

And after this efforts to install pi-hole leads to the issue discribed in the topic

I tried another method and I moved on a bit. I commented all lines in /etc/apt/sources.list and then tried to install pi-hole. Part of log is below

::: You are root.
::: Verifying free disk space...
:::
::: Updating local cache of available packages... done!
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with Pi-hole installation...
::: Checking for apt-utils... installed!
::: Checking for dialog... installed!
::: Checking for debconf... installed!
::: Checking for dhcpcd5... installed!
::: Checking for git... installed!
::: Checking for iproute2... installed!
::: Checking for whiptail... installed!
:::
::: Stopping dnsmasq service... done.
:::
::: Stopping lighttpd service... done.
::: Using Google DNS servers.
::: Static IP already configured
::: Found neither IPv6 ULA nor GUA address, blocking IPv6 ads will not be enabled
::: IPv4 address: 192.168.1.100/24
::: IPv6 address:
::: Web Interface On.
::: Logging On.
:::

There I was forwarded to window of configuring steps.

::: Checking for existing repository...
::: Updating repo in /etc/.pihole... done!
done!
:::
::: Checking for existing repository...
::: Updating repo in /var/www/html/admin... done!
done!
::: Checking for bc... added to install list!
::: Checking for cron... installed!
::: Checking for curl... installed!
::: Checking for dnsmasq... added to install list!
::: Checking for dnsutils... added to install list!
::: Checking for iputils-ping... installed!
::: Checking for lsof... added to install list!
::: Checking for netcat... added to install list!
::: Checking for sudo... installed!
::: Checking for unzip... installed!
::: Checking for wget... installed!
::: Checking for lighttpd... added to install list!
::: Checking for php5-common... added to install list!
::: Checking for php5-cgi... added to install list!

And then nothing again. It just throwes me to command line.

Probably the problem is in source.list?
#deb Index of /raspbian jessie main universe contrib non-free rpi
#Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src Index of /raspbian/ jessie main contrib non-free rpi
thats how it looks now

Commenting out all of the raspbian.org lines from the sources.list file will block the Pi from being able to get any of the dependent packages from Raspbian. And it looks like you may have some files in the sources.list.d directory, as it appears that it's looking for the RPIMonitor repository.

In the minimum, you need the first line of sources.list to get the packages from the Raspbian repository. I just checked the Raspberry Pi forum site and there looks like there were some problems with the mirrordirector.raspbian.org site but they may be resolved. Try uncommenting that first line and do an apt-get update again and see if you get the same error.

I uncommented 1st line is source.list and executed sudo apt-get update. Log is below.

Hit http://archive.raspberrypi.org jessie InRelease
Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Ign http://giteduberger.fr rpimonitor/ InRelease
Hit http://giteduberger.fr rpimonitor/ Release.gpg
Hit http://giteduberger.fr rpimonitor/ Release
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Get:2 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,536 kB]
Hit http://giteduberger.fr rpimonitor/ Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://giteduberger.fr rpimonitor/ Translation-en_GB
Ign http://giteduberger.fr rpimonitor/ Translation-en
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Fetched 9,551 kB in 11s (798 kB/s)
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/InRelease Unable to find expected entry 'universe/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

Do you think that the problem is in the mirrordirector.raspbian.org site and I just have to wait before they will solve it? Are there any other methods of installing po-hole without using mirrordirector.raspbian.org?

Since this appears to be a Raspbian issue and not something with Pi-hole, I would try posting a topic at Raspberry Pi Forums - Index page and see if they have anything to say about mirrodirector not working correctly. Pi-hole is dependent upon the packages from Raspbian and the only way to get those packages are directly through Raspbian.

Thanks for your answers!
I'l talk the problem over on Raspberry Pi Forums - Index page as you suggested.
If I solve the issue I write a solution there.

I found the solution of the issue. Repository link was incorrect.
Discussion thread is there Cannot install Pi-hole. Problem with repository [SOLVED] - Raspberry Pi Forums
Many thanks for your help!
The topic is closed.

1 Like