Can't install Pihole after OS Reinstallion

The issue I am facing:

Hello sorry in advance I am very new to all this,

I have reinstalled Rasberry pi os lite on my rasberry pi zero W 2 device as. I was facing issues and thought reinstalling the OS completly could help and now when i’m trying to download pihole with “curl -sSL https://install.pi-hole.net | bash”, I get “curl: (6) Could not resolve host: install.pi-hole.net” in the end it just created more issues

What I have changed since installing New OS:

I have tried switching temporarily to a public DNS server in my /etc/resolv.conf but I am still getting the same error

I’ve seen other discussions mentionning changing something in the DHCP file I would need more explaination as of how I should rewrite the document if that is the problem.

Note : Before reinstalling the OS I had already managed to install Pi-hole on my device but I was facing other issues

I canno’t send you a debug log since pihole is currently not installed and I am not able to install it on my device

In case you haven’t figured this out yet, a couple of thoughts.

First, if you still can’t resolve install.pi-hole.net, you’re going to need to get DNS working on your Pi-Zero. According to Change DNS servers - Raspberry Pi Forums, you should edit your /etc/dchpcd.config to assign static servers. You say you’ve done that, but it’s not clear where the failure is occurring yet.

If you, from your Pi-Zero, type dig install.pi-hole.net, what is the output? That will let us know what DNS server is being used along with other information.

I think best is to start with a fresh Pi-OS lite image.
OOTB without Pi-hole installed or any changes made, below one should resolve to an IP address first:

$ dig +short install.pi-hole.net
aws-ls-lon1.pi-hole.net.
18.169.210.144

If not, you have networking issues that are not related to Pi-hole.

Above only applies for pre Pi-OS Bookworm releases.
Bookworm and above use NetworkManager instead of dhcpcd which can be configured with below (Network Manager Text User Interface):

sudo nmtui

EDIT: Some hints about prepping a Pi:

Above only applies for pre Pi-OS Bookworm releases.

Thanks for pointing that out; I knew something seemed off about that advice, but I didn’t know from my very limited experience. Glad I cited my source so it could be corrected. :slight_smile: