Pi-hole Update problem

An update for Core is pending.
The update ran without problems for 4 Pi-hole installations, but 1 installation is causing problems.

Pihole is installed under the current DietPi OS(bookworm) v9.9.0 on an RPi4.

root@pihole:~# pihole -v
Pi-hole version is v5.18.3 (Latest: v5.18.4)
web version is v5.21 (Latest: v5.21)
FTL version is v5.25.2 (Latest: v5.25.2)
root@pihole:~# pihole -up
[โœ“] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 8.2.26
[โœ“] Checking for git
[โœ“] Checking for iproute2
[โœ“] Checking for dialog
[โœ“] Checking for ca-certificates

[i] Checking for updates...
[i] Pi-hole Core: update available
fatal: No tags can describe '5c8945c81c98f6f17e5c138ffbfdcb0831e5a062'.
Try --always, or create some tags.

Error: Remote revision could not be obtained, please contact Pi-hole Support
Additional debugging output:
On branch master
nothing to commit, working tree clean

I would be very grateful for any hints on the solution!

@Falconcrest - can you provide a debug token please? (pihole -d)

I've just updated a system from 5.18.3 -> 5.18.4 with no issues

pi@raspberrypi:~ $ pihole -v
  Pi-hole version is v5.18.3 (Latest: v5.18.4)
  web version is v5.21 (Latest: v5.21)
  FTL version is v5.25.2 (Latest: v5.25.2)
pi@raspberrypi:~ $ pihole -up
  [โœ“] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.4.33
  [โœ“] Checking for git
  [โœ“] Checking for iproute2
  [โœ“] Checking for dialog
  [โœ“] Checking for ca-certificates

  [i] Checking for updates...
  [i] Pi-hole Core:     update available
  [i] Web Interface:    up to date
  [i] FTL:              up to date

//SNIP//

  [i] The install log is located at: /etc/pihole/install.log
  [โœ“] Update complete!

  Current Pi-hole version is v5.18.4
  Current web version is v5.21
  Current FTL version is v5.25.2

For what it's worth - there is nothing in this update of any interest to anyone other than people installing on Fedora 41

https://tricorder.pi-hole.net/4eKmVyl8/

Is that what you mean?

Thanks, exactly that.

Everything looks OK there - but seemingly it can't pull from Github to update the local repo.

Try manually going into the directory and pulling:

cd /etc/.pihole
sudo git reset --hard
sudo git pull

Then pihole -r to run the repair

root@pihole:/etc/.pihole# sudo git pull
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

Sorry, I don't know what to do!

That's odd - have you run any commands inside this directory before? I wouldn't expect to see a message like this - but this probably explains why the update script is failing.

try a sudo git pull --rebase

If that doesn't work, we can just go nuclear.

cd ~
sudo rm -rf /etc/.pihole
sudo git clone https://github.com/pi-hole/pi-hole /etc/.pihole
pihole -r
1 Like

Thanks for the help, but it doesn't seem to help. After your last commands, Core was hard set to 5.18.4, but an albeit pointless attempt at pihole -up produced the same error messages as before.
All blacklisted and whitelisted domains were gone. It looks like I won't be able to avoid a new installation.
The only thing that could have possibly caused the problem is that I had installed a speedtest addon once and then uninstalled it again, where the core was also set to its own version (5.18.2.X).

(GitHub - arevindh/pihole-speedtest: Pihole Speedtest Mod)

After the deinstallation everything worked normally until the problem with the update of Core occurred.

This should not have happened!

Did you copy the commands exactly as they were in my message? Note the . in the path /etc/.pihole - there is an important distinction between this and /etc/pihole

  • /etc/.pihole - Where the git repository lives
  • /etc/pihole - Where the configuration data lives

Yes, I used copy & paste.

First of all, I wish you a happy new year.:fireworks:

I have completely set up a new system.
It works perfectly again.

With the second system, your :atom_symbol: method has helped at least to the extent that the versions of Core, Web and FTL are up to date again.

Unfortunately, the problem I described at the beginning with pihole - up is still there.

However, I can live with this for the time being and am waiting for the release of Pi-hole v6 with a new installation.

Many thanks for your help!:+1:

Why don't you copy the SD card of a working system to the faulty system?

This is certainly not so easy, as they are different Raspberry Pi.
(3x RPi Zero, 1 RPi 3B+ and 1x RPi 4)
Since the problem is on an RPi 4, I cannot use the other systems.
I am waiting for the release of Pi-hole v6 and will then reinstall or try an upgrade if possible.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.