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

**URL:** <https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734>\
**Category:** Help\
**Created:** [January 24, 2018, 3:20am UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734 "2018-01-24T03:20:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikexc47](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@mikexc47](https://discourse.pi-hole.net/u/mikexc47)\
**Post date:** [January 24, 2018, 3:20am UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/1 "2018-01-24T03:20:31Z")

</div>

Expected Behaviour:  
pi-hole should install fine as I am running the “curl -sSL [https://install.pi-hole.net](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”

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [January 24, 2018, 3:46am UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/2 "2018-01-24T03:46:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![James\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/james_horn/32/599_2.png) [@James\_Horn](https://discourse.pi-hole.net/u/James_Horn)\
**Post date:** [January 24, 2018, 1:49pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/3 "2018-01-24T13:49:47Z")

</div>

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](https://install.pi-hole.net) | bash" command?

---

<div class="post-metadata">

**Author:** ![mikexc47](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@mikexc47](https://discourse.pi-hole.net/u/mikexc47)\
**Post date:** [January 25, 2018, 11:03pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/4 "2018-01-25T23:03:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [January 27, 2018, 9:42pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/5 "2018-01-27T21:42:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rob\_Dylan](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@Rob\_Dylan](https://discourse.pi-hole.net/u/Rob_Dylan)\
**Post date:** [February 27, 2019, 5:26pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/6 "2019-02-27T17:26:06Z")

</div>

I have the same problem.

 ![](https://discourse.pi-hole.net/uploads/default/original/2X/7/7758ae12146e02d42d07bb0191011b61a313bf62.jpeg)  
I downloaded the newest version of Raspbian on [https://www.raspberrypi.org/downloads/raspbian](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.

---

<div class="post-metadata">

**Author:** ![RamSet](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/ramset/32/3497_2.png) [@RamSet](https://discourse.pi-hole.net/u/RamSet)\
**Post date:** [February 27, 2019, 5:38pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/7 "2019-02-27T17:38:19Z")

</div>

> [@Rob\_Dylan](#):
>
> I downloaded the newest version of Raspbian

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 ...

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [February 27, 2019, 5:57pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/8 "2019-02-27T17:57:50Z")

</div>

> [@Rob\_Dylan](#):
>
> I downloaded the newest version of Raspbian

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.

---

<div class="post-metadata">

**Author:** ![Rob\_Dylan](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@Rob\_Dylan](https://discourse.pi-hole.net/u/Rob_Dylan)\
**Post date:** [February 27, 2019, 7:02pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/9 "2019-02-27T19:02:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [February 27, 2019, 7:07pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/10 "2019-02-27T19:07:15Z")

</div>

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.

[https://www.reddit.com/r/pihole/comments/9y9e9w/simple\_guide\_to\_setting\_up\_a\_pi\_zero\_w\_and/](https://www.reddit.com/r/pihole/comments/9y9e9w/simple_guide_to_setting_up_a_pi_zero_w_and/)

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

> [@How do I configure my devices to use Pi-hole as their DNS server?](https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245):
>
> Three methods Generally, there are three different methods that will enable devices on your network to be protected by Pi-hole. 1. Define Pi-hole's IP address as the only DNS entry in the router Rationale Only is italicized here for a reason: Pi-hole needs to be the only DNS server because it intercepts queries and decides whether or not they should be blocked. If you have other DNS servers configured, you may be sent to the correct domain, bypassing Pi-hole completely. Because of this, we re…

> [@Why should Pi-hole be my only DNS server?](https://discourse.pi-hole.net/t/why-should-pi-hole-be-my-only-dns-server/3376):
>
> Reduced Ad Blocking Capability The main reason you should Pi-hole as your only DNS server is that you will see increased performance in the blocking of ads. If you have two DNS servers (Pi-hole and something else), your network clients may not always query Pi-hole for name resolution. If a query happens to be answered from a non-Pi-hole DNS server, your block lists will not apply (since that DNS server doesn't know about them). All Queries Need To Go Through Pi-hole First Since other DNS serv…

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:

> [@How do I debug my Pi-hole installation?](https://discourse.pi-hole.net/t/how-do-i-debug-my-pi-hole-installation/3104):
>
> Login into your Pi-hole's command line Enter sudo pihole -d Provide us with the debug token that is generated after the debug script completes Alternative: Securely sending us additional information Preferred Method If there is additional information you want to provide us, you can upload any kind of text to our server. You will still get a debug token so your information will remain anonymous. To do this, you can pipe some shell output into netcat, which will upload it to our [secure server](https://pi-hole.net/2016/11/07/crack-our-medical-tricorder-win-a-raspberry-pi-3/). …

---

<div class="post-metadata">

**Author:** ![21\_nitrok](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/21_nitrok/32/51816_2.png) [@21\_nitrok](https://discourse.pi-hole.net/u/21_nitrok)\
**Post date:** [November 17, 2025, 7:19pm UTC](https://discourse.pi-hole.net/t/unable-to-install-pi-hole-bash-curl-command-not-found/6734/11 "2025-11-17T19:19:05Z")

</div>

Hey, I just wanted to say this really helped out. I hadn’t run sudo apt-get upgrade. It took a while, maybe 20 or so minutes after running it, and when running the `curl -L https://install.pivpn.io | bash` command, it worked! I’m not really sure why it works though but I assume that it refreshed my DNS.
