Unable to update Pi-hole. Error: Web Admin repo is missing from system!

Hello there,

Installed Pi-hole a couple of months ago on a brand new RPi Model 4B/4GB/32GB running Buster and all has been running nicely ever since AFAIK.

I did notice recently though that the Web Interface has been showing Update available for a few weeks now but when I clicked and was forwarded to Github it was showing the latest version as 5.1.1 which was the one I had installed so I ignored the update at that time.

However now with all 3 components now showing as Update Available ;
Pi-hole v5.1.2 - Update available!
Web interface - Update available! (Why does this one not show the current version like the others?)
FTL v5.2 - Update available!

I thought I'd run pihole -up but I get the following response;

[i] Checking for updates...
[i] Pi-hole Core: update available

Error: Web Admin repo is missing from system!
Please re-run install script from https://pi-hole.net pi@RaspberryPi-hole:

So after searching on here and finding a thread from just over a year ago that seemed to mirror my own problems I tried a few things that I saw including pihole -r which returned the following;

[✓] Root user check

    .;;,.
    .ccccc:,.
     :cccclll:.      ..,,
      :ccccclll.   ;ooodc
       'ccll:;ll .oooodc
         .;cll.;;looo:.
             .. ','.
            .',,,,,,'.
          .',,,,,,,,,,.
        .',,,,,,,,,,,,....
      ....''',,,,,,,'.......
    .........  ....  .........
    ..........      ..........
    ..........      ..........
    .........  ....  .........
      ........,,,,,,,'......
        ....',,,,,,,,,,,,.
           .',,,,,,,,,'.
            .',,,,,,'.
              ..'''.

[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.19-1~deb10u1
[i] Repair option selected
[✓] Disk space check

[✓] Checking apt-get for upgraded packages... up to date!

[i] Installer Dependency checks...
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[✓] Checking for dnsutils

[✓] Supported OS detected
[i] SELinux not detected
[i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
[i] Resetting repository within /var/www/html/admin...... Unable to reset /var/www/html/admin, exiting installer pi@RaspberryPi-hole:

So I then tried;

cd /etc/.pihole/
git status

which returned;

On branch master Your branch is behind 'origin/master' by 570 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)

nothing to commit, working tree clean

I ran git pull and then tried pihole -up again to no avail so I then tried pihole checkout ftl master which returned;

Error: Web Admin repo is missing from system!
Please re-run install script from GitHub - pi-hole/pi-hole: A black hole for Internet advertisements

So is running the install script on a perfectly working Pi-hole installation the only resort I have left and if so;

  1. What is the full command to re-run the install script?
  2. What impact might that have on my Pi-hole installation?
  3. Will I have to setup Pi-hole all over again or will re-running the install script maintain any and all changes I might have made?

If there is no choice but to re-run the install script I might just leave everything as is because it took me a whole year to pluck up the courage to install Pi-hole on a perfectly working RPi in the first place!

Thanks & kind regards,
-=Glyn=-

UPDATE After a reboot I notice that at the bottom of the Admin page that Pi-hole is now at v5.2.1 so that looks to have updated but both Web Interface & FTL are still showing as Update available!

cd /var/www/html/admin
sudo git status

Thanks very much for the reply Dan.

Running the two commands you suggest I see the following;

/var/www/html/admin $ sudo git status
error: inflate: data stream error (invalid distance too far back)
fatal: packed object 94fb5490a2ed10b2c69a4a567a4fd2e4f706d841 (stored in .git/objects/pack/pack-eb3b594aca26696af6db9b24cbefced55f7ffce0.pack) is corrupt

Does this help?

Thanks & kind regards,
-=Glyn=-

That doesn't look very good.

You can try removing the directory and running a repair:

sudo rm -rf /var/www/html/admin
pihole -r

But we don't know what may have cause the corruption. Is this running on an SDCard?

That doesn't sound very good!

~ $ sudo rm -rf /var/www/html/admin
~ $ pihole -r

[✓] Root user check

    .;;,.
    .ccccc:,.
     :cccclll:.      ..,,
      :ccccclll.   ;ooodc
       'ccll:;ll .oooodc
         .;cll.;;looo:.
             .. ','.
            .',,,,,,'.
          .',,,,,,,,,,.
        .',,,,,,,,,,,,....
      ....''',,,,,,,'.......
    .........  ....  .........
    ..........      ..........
    ..........      ..........
    .........  ....  .........
      ........,,,,,,,'......
        ....',,,,,,,,,,,,.
           .',,,,,,,,,'.
            .',,,,,,'.
              ..'''.

[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.19-1~deb10u1
[i] Repair option selected

[✓] Checking apt-get for upgraded packages... 9 updates available
[i] It is recommended to update your OS after installing the Pi-hole!

[i] Installer Dependency checks...
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[✓] Checking for dnsutils

[✓] Supported OS detected
[i] SELinux not detected
[i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
Unable to reset /var/www/html/admin, exiting installer

It is running on a brand new 8 week old SanDisk Extreme Pro 32GB microSDHC and is powered via a PoE HAT supplied from a PoE Switch running on a UPS, has never had a power failure and I am very careful in shutting it down gracefully from the command line not by just pulling the ethernet cable or toggling the power.

I'm running out of options here aren't I Dan?

Thanks for taking the time to reply again...I appreciate your help.

Thanks & kind regards,
-=Glyn=-

UPDATE Ah...now my Admin Panel is not working although both DNS is running & Blocking is still enabled...:frowning:

A quick pihole -v returns;

Pi-hole version is v5.2.1 (Latest: v5.2.1)
AdminLTE version is -1 (Latest: v5.2.1)
FTL version is v5.2 (Latest: v5.3.2)

Seems like AdminLTE has suffered amnesia!

Run the status again.

cd /var/www/html/admin
sudo git status

Edit: Assuming this is the problem: Unable to reset /var/www/html/admin, exiting installer

1 Like

One more thing that may be helpful to try

cd /var/www/html
sudo git clone --depth 20 https://github.com/pi-hole/adminlte /var/www/html/admin
2 Likes

Thanks Dan but...erm...didn't I remove that very folder a couple of posts ago?

Anyway I just ran it but got this as expected;

~ $ cd /var/www/html/admin
bash: cd: /var/www/html/admin: No such file or directory

Thanks & kind regards,
-=Glyn=-

Yup! That seems to have done the trick.

Ran pihole -up and it has now updated to the latest & greatest and I have my WebAdmin back!

~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date

[✓] Everything is up to date!

Thank you so much...I was on the verge of giving up due to my limited knowledge with Raspberry Pi but I seem to be back in business thanks to your help.

Fantastic!

Thanks again Dan...you're a star!

Kind regards,
-=Glyn=-

2 Likes

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