Error - non-root privileges - why does this always happen?

The uninstaller is not optimal and needs some love. The limitations are known. The goal is to let pihole only uninstall packages that were installed during pihole's installation, not something that has been there before. Until then the script ask for every package if the user wants to uninstall it.

If this was the case then why did it uninstall curl? It listed it as a dependency installed by pihole.

It's a dependency, but was likely installed already by your OS by default. Pihole needs curl, so on systems without it needs to be installed.

In the end it was uninstalled because you told it to uninstalled.

So when it says:

[i] The following dependencies may have been added by the Pi-hole install:
dhcpcd5 git iproute2 whiptail dnsutils cron curl iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2 lighttpd php7.3-common php7.3-cgi php7.3-sqlite3 php7.3-xml php7.3-json php7.3-intl

It's just listing ones that were used by pi-hole, some of which may be OS defaults?

Currently yes. This is the reason for the issue report linked above.

1 Like

I see, thank you. I made an updated thread covering my other issues here. Perhaps it would be worth adding to the docs it's still WIP and up to the user to decided which dependencies should be uninstalled as some are system defaults.

Yep, that's the right answer.

Edit: We need sudo powers to do a few things on the installer. That message is just a notification that the script is going to restart and be called with sudo for you in order to do things. Had you been using any account but a paswordless sudo pi user, you would have been asked for your password.

It would be bad security practice for use to automatically run a script as sudo without some kind of notification to the user that we were going to do that. So we tell you.

1 Like

I see, thank you. I moved my other issues to the other thread, hopefully I can re-install and figure out what was causing this symlink bug - I still think a note in the dos would be useful, it threw me way off, and a bunch of my friends. It comes across as an error as if you've done something wrong...

But it continues to fully install.

The damage was the uninstall which should also warn you that you shouldn't remove packages you don't know if you need or not.

1 Like

It's true that it continues to install - but I'm left not sure if I broke something, or I did something wrong which was inferred by the "Pi-hole requires elevated privileges to install and run", only a suggestion but it would have definitely saved me a lot of questioning if it said something more along the lines of "Script called with non-root privileges, this is normal using a default environment but please make sure you trust this source" etc

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