today i tried to install pihole under 20.04 for my pi, as described here: https://www.ubuntuboss.com/how-to-install-pihole-on-ubuntu-18-04/
i had to configure /etc/netplan/50-cloud-init.yaml instead of /etc/network/interfaces but that's not the problem. the problem is that i kept getting an error telling me that dhcpcd5 could not be found. i tried the curl line, with the same result. i tried to install dhcpcd5 using apt-get. same result. what can i do?
Most likely you have messed the yaml file. The best way to solve the issue in your case would be to revert back the changes and make a DHCP reservation by MAC in your router (so you can have a static IP address) and simply run this to install PiHole:
curl -sSL https://install.pi-hole.net | bash
If you still want to use a static IP via netplan, post here the content of the 50-cloud-init.yaml file.
i checked my yaml file with sudo netplan --debug generate, and it said configuration valid.
here it is:
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: false
dhcp6: false
addresses: [192.168.1.6/24]
nameservers:
addresses: [208.67.220.220, 208.67.222.222]
and there is one more line which i think i forgot to remove:
optional: true.
i dunno why, but the pi suddenly refuses ssh connections, so i had to type it all in instead of copying and pasting it ![]()
Next time your stranded without network:
sudo ip link set eth0 up
sudo ip addr add 192.168.1.6/24 dev eth0
Check:
ip address show
ip route show
If also want to connect via router 192.168.1.1 to Internet:
sudo ip route add default via 192.168.1.1
ip route show
you seem to be under the impression that the network on my pi doesn't work at all, but that is not the case. the problem is that the pi-hole installer keeps throwing errors at me because it can't find dhcpcd5, and that the pi stubbornly refuses to accept ssh connections.
If your using netplan as network manager to configure IP etc, you probably dont want dhcpcd5 (a second network manager) installed at all.
I posted below a while back.
Can give it a try.
But dont know for sure how the installer copes with this.
It's not up to me. The pi-hole installer doesn't ask before trying to install dhcpcd5.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.