Unable to install pi-hole - bash: curl: command not found


Expected Behaviour:
pi-hole should install fine as I am running the “curl -sSL https://install.pi-hole.net | bash” command.

Actual Behaviour:
However, I get this error when running it and I don’t know why: “bash: curl: command not found” I am using a raspbian rasberry pi 3. I have looked through other posts and have tried running “sudo apt-get update” the pi updates all fine but doesn’t change the error I get when running the install command

Debug Token:
This is what I get when running pihole-d. “bash: pihole: command not found”



You’re missing the curl command, try sudo apt-get install curl.



Curiosity question, you stated you had done “sudo apt-get update”, but did you follow that with “sudo apt-get upgrade” before doing the “curl -sSL https://install.pi-hole.net | bash” command?



I just tried that and it seems to have done something. I am not getting a different failed message:

curl: (7) failed to connect to raw.githubusercontent.com port 443: no route to host

Thanks for the help so far



Are you able to connect to the internet on that device?



I have the same problem.

I downloaded the newest version of Raspbian on https://www.raspberrypi.org/downloads/raspbian, then flashed the SD card with belenaEtcher on Windows.
I’m using a new Raspberry Pi 3B+ (Made in the UK/2017). I know that I can use wget to download the script, but I already installed Pi-hole on the device earlier and I had some trouble setting things up. This is a fresh installation of Respbian. I want to be sure that the issue is not hardware related, before moving on.



That’s strange … I’m running 9.6 …

what’s the output of cat /etc/os-release ?

You might want to do a sudo apt-get update and sudo apt-get upgrade before installing Pi-hole …



You dowloaded and installed the version of Raspbian that was current at the time that image was made.

Your cat /etc/debian_version shows 9.4, but the latest is 9.8. As @ramset noted, you should update the OS prior to running your Pi-Hole installer.



That did fix the issue with the installation. Thank you. Do you know a written guide on how to set up Pi-hole? The one’s I found didn’t work for me. I mean I manage to get into the admin panel through my Desktop, but the add-blocking does only work on the so far Pi. I’ve tried changing the Ethernet adapter on Windows, point to the Pi through the DNS settings on my router and use the DHCP settings by Pi-hole.



This guide I wrote and posted on Reddit. I had originally written it for a friend who started with zero Linux knowledge and wanted to set up a Pi-Hole from scratch. The guide gets you to a running Pi-Hole, and doesn’t discuss how to do configuration and other details in Pi-Hole.

We have several FAQ’s on this forum for configuring clients to use Pi-Hole:

Please generate a debug log, upload it when prompted and post the token here. We can take a look at your Pi-Hole setup for any errors.

pihole -d from the Linux terminal

or do it through the Web interface: