Unable to install pi-hole on Raspbian

Hi,

I'm trying to install pi-hole on a new Raspbian 3 device with Raspbian GNU/Linux 9 with the command:
curl -sSL https://install.pi-hole.net | sudo bash -x

It shows a blue dialog window, but that only show a few seconds and it ends with:

debconf-apt-progress -- apt-get --yes --no-install-recommends install dialog

When I do sudo apt-get install dialog I get:

The following packages have unmet dependencies:
dialog : Depends: libncursesw5 (>= 5.6+20070908) but it is not going to be installed
libtinfo5 : Breaks: dialog (< 1.2-20130523) but 1.1-20120215-2 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Any idea how to fix this issue? Thank you.

Kind regards,

Nick

Versions displayed look bit old.
Can you try update distro first with:

sudo apt update && sudo apt upgrade

And what is displayed after with below ones ?

uname -rm

cat /etc/issue

dpkg --print-architecture

apt-cache policy dialog libncursesw5 libtinfo5

If something got updated, try install again.
And check the install log at:

cat /etc/pihole/install.log

I had already done sudo apt update && sudo apt upgrade . At the moment everything is up to date.

uname -rm :: 4.9.59-v7+ armv7l

cat /etc/issue :: Raspbian GNU/Linux 9

dpgk --print-architecture :: armhf

apt-cache policy dialog libncursesw5 libtinfo5 ::

dialog:
Installed: (none)
Candidate: 1.1-20120215-2
Version table:
1.1-20120215-2 500
500 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
libncursesw5:
Installed: 6.0+20161126-1+deb9u1
Candidate: 6.0+20161126-1+deb9u1
Version table:
*** 6.0+20161126-1+deb9u1 100
100 /var/lib/dpkg/status
5.9-10 500
500 http://archive.raspbian.org/raspbian wheezy/main armhf Packages
libtinfo5:
Installed: 6.0+20161126-1+deb9u1
Candidate: 6.0+20161126-1+deb9u1
Version table:
*** 6.0+20161126-1+deb9u1 100
100 /var/lib/dpkg/status
5.9-10 500
500 http://archive.raspbian.org/raspbian wheezy/main armhf Packages

There is no /etc/pihole/install.log file on the device.

I don't know what I should try to install again?

Any idea why sources are still set for Wheezy (if its a new install) ?

$ cat /etc/issue
Raspbian GNU/Linux 9 \n \l

$ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi

Thank you. I started over and wheezy should have been stretch in my case.

Working now ?
What did you do to get it fixed ?

Yes it is working now. In my /etc/apt/sources.list I had to change my repo. I was getting 403 Forbidden errors with the original value. I have now:

deb http://archive.raspbian.org/raspbian stretch main contrib non-free

So the wheezy is gone and I replaced it with stretch. After that the update and upgrade commands worked without errors and after that the installation of Pi-Hole went without any problems.

Thank you for pointing out my mistake.

1 Like

I dont know why Raspbian has Stretch packages available on the archive.raspbian.org and the mirrordirector.raspbian.org location.
But why not copy the whole (default) line from my sources config file including the "rpi" packages ?

deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi

EDIT: Weird thing is, they even did not bother to deploy new way of apt (Version>=1.1) selecting mirrors:

https://deb.debian.org/

$ host -t srv _http._tcp.deb.debian.org
_http._tcp.deb.debian.org has SRV record 10 1 80 prod.debian.map.fastly.net.

$ host -t srv _http._tcp.apt.xbian.org
_http._tcp.apt.xbian.org has SRV record 10 1 80 xbian-apt.mirrorservice.org.
_http._tcp.apt.xbian.org has SRV record 10 1 80 apt.xbian.org.
_http._tcp.apt.xbian.org has SRV record 10 1 80 apt1.xbian.org.
_http._tcp.apt.xbian.org has SRV record 10 1 80 apt2.xbian.org.

$ host -t srv _http._tcp.archive.raspbian.org
Host _http._tcp.archive.raspbian.org not found: 3(NXDOMAIN)

$ host -t srv _http._tcp.mirrordirector.raspbian.org
Host _http._tcp.mirrordirector.raspbian.org not found: 3(NXDOMAIN)

I went with your comment that wheezy shouldn't be in my sources.list file. If I did an install and upgrade command sequence I got a whole bunch of 403 Forbidden errors. I googled it and one suggestion was to change my sources.list file, that is how wheezy ended up in my sources.list file. That got rid of the 403 errors but introduced a whole bunch of other problems.

You made a comment that wheezy shouldn't be there. So I did a complete reinstall and this time only made minimal changes to the sources.list file and only changed the url part (not everything that is behind it). I did not even notice that in your version rpi is included. But (for me) it works without adding rpi.