Warning: Unable to locate configuration file to set static IPv4 address

Hello Pi-hole community!

Trying to install Pihole on my Centos 7 VM (centos-release-7-3.1611.el7.centos.x86_64) and get the following error message: Warning: Unable to locate configuration file to set static IPv4 address.

Found a similar thread, but with Kali Linux: Pi-hole installation process on Kali linux interrupted

Also one with Debian Jessie: Help, Error install pi-hole · Issue #712 · pi-hole/pi-hole · GitHub

But still having trouble on solving this issue.

Thank you.

Hi, I faced the same issue and after looking for some time in google and not finding an aswer decided to look at the script and found that the installation fails because it does not find a file located in '/etc/sysconfig/network-scripts/'
The instalation process looks for a file named 'ifcfg-${PIHOLE_INTERFACE}' where ${PIHOLE_INTERFACE} is the name of the selected network adapter.
I just needed to create a file with that name using 'touch ifcfg-${PIHOLE_INTERFACE}' and the solution went smoothly.

Hope it helps.

Vicho has the right idea.

I ran into this situate when I migrated my Pi-hole server Virtual Machine from VMWare to KVM. The migration tools changed the network interface ens3 to eth0, but didn't make a ifcfg-eth0 file to go with it.

I configured to 01_...pihole file to use eth0, but the configuration script still could not find the file. I copied /etc/sysconfig/network-scripts/ifcfg-ens3.bak to. ifcfg-eth0 . That fixed the error.

Also check /etc/dhcpcd.conf to make sure there are no conflicts or unwanted static IP addresses set.