Why does the Pi-hole installer produce the error "Unable to complete update, contact Pi-hole'?

If you try to install or update Pi-hole but run into problems, you may see a message such as:

[✓] Check for existing repository in /var/www/html/admin
[i] Update repo in /var/www/html/admin…
Error: Could not update local repository. Contact support.

Broken Or Modified Web Interface

This error typically means the Web interface (or the Core) repository has been modified in some fashion. Since we use git to check for updates and keep Pi-hole up-to-date, you will need to remove your changes,

cd /var/www/html/admin
sudo git fetch --tags
sudo git reset --hard


cd /etc/.pihole
sudo git fetch --tags
sudo git reset --hard

and then try updating or installing again.