0

Machine: Raspberry Pi Zero
OS: Raspberry Pi OS (32-bit) Lite

Hello, today i wanted to install PiHole on my Raspberry Pi. But when I try to install it via the script as a root user, it fails after I went through the installation process and i get this output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package dns-root-data is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package lighttpd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package lsof is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package netcat is a virtual package provided by:
netcat-traditional 1.10-41.1
netcat-openbsd 1.195-2
You should explicitly select one to install.

E: Package 'lsof' has no installation candidate
E: Package 'netcat' has no installation candidate
E: Unable to locate package idn2
E: Unable to locate package sqlite3
E: Package 'dns-root-data' has no installation candidate
E: Package 'lighttpd' has no installation candidate
E: Unable to locate package php5-common
E: Unable to locate package php5-cgi
E: Unable to locate package php5-sqlite
E: Unable to locate package php5-xml
E: Unable to locate package php-intl

When i try to install these packages manually, I get the errors shown after the E: I don't know if it matters, but on the same machine I have PiVPN installed.

1
  • For the PHP packages, you are trying to install old versions. The packages probably have newer versions available for install. I suspect that the instructions you are using are out dated. Commented Jun 1, 2020 at 19:10

1 Answer 1

1

I would start with a clean Buster lite.

  1. Set the IP address for the device on your router before booting the Pi for the first time (assuming you know the MAC address else see below).
  2. Boot the SD card and use sudo raspi-config to set the Pi password, the computer name and expand the disk.
  3. If you did not set the IP address on the router do it now using ifconfig to find the MAC address (ether entry from output of the command)
  4. Reboot
  5. Allow SSH and then apt update / apt upgrade.
  6. Reboot

Then to install pi-hole log in as Pi and I ssue the following command as the Pi user (not root and not using sudo)

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

Then follow the prompts - remember to select the filter lists you want to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.