Installed pi-hole on a raspberry pi with fresh install of raspbian stretch lite. Pi-hole web interface shows zero domains on blocklist. Running 'pihole -g' or 'pihole -r' and selecting repair leads to:
"No IP addresses found! Please run 'pihole -r' to reconfigure"
I initially thought this was down to a DNS problem, because e.g. "ping google.com" gave an error saying "problem resolving host" whereas pinging the IP address directly worked. I managed to fix this by adding "nameserver 8.8.8.8" to /etc/resolvconf/resolv.conf.d/head and telling resolvconf to update. This hasn't fixed the problem with pi-hole though.
Your installations is missing certain required parameters.
Did you populate the required information during setup ?
The zero domains in the blocklists, eventhough I do see you installed the default blocklists is due to the fact that the DNS resolution failed before the download of the lists.
A few things stick out in your debug log. In addition to an empty gravity list, your setup variables are not populated. There is no IP address assigned to Pi-Hole for either IPV4 or IPV6, and it can't communicate with your router (gateway). The Pi-Hole can't load the local lists in /etc/pihole, etc.
It is not clear from your original post if you did run the pihole -r command and select the "reconfigure" option, and if so, what was the result?
From the number of problems shown in the debug log, we can either try to address them one at a time (assuming a reconfigure or repair won't fix it), but it will likely be easier for you to uninstall P-Hole (pihole -uninstall), get the Pi OS cleaned up if necessary (run all the updates/upgrades, check IP address, locale, etc), then reinstall PiHole.