CentOS 7.3.1611
I ran the usual to update to the latest V2.10:
curl -L https://install.pi-hole.net | bash
During the upgrade, I receive an error.
Here is the full trace:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
:::
::: You are root.
100 39652 100 39652 0 0 24852 0 0:00:01 0:00:01 --:--:-- 313k
::: Update option selected.
::: Verifying free disk space...
:::
::: yum update has not been run today. Running now... done!
:::
::: Checking yum for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with Pi-hole installation...
::: Checking for git... installed!
::: Checking for iproute... installed!
::: Checking for net-tools... installed!
::: Checking for newt... installed!
::: Checking for procps-ng... installed!
:::
::: Checking for existing repository...
::: Cloning https://github.com/pi-hole/pi-hole.git into /etc/.pihole... done!
:::
::: Checking for existing repository...
::: Cloning https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin... done!
::: Checking for bc... installed!
::: Checking for bind-utils... installed!
::: Checking for cronie... installed!
::: Checking for curl... installed!
::: Checking for dnsmasq... installed!
::: Checking for epel-release... installed!
::: Checking for findutils... installed!
::: Checking for lighttpd... installed!
::: Checking for lighttpd-fastcgi... installed!
::: Checking for nmap-ncat... installed!
::: Checking for php... installed!
::: Checking for php-common... installed!
::: Checking for php-cli... installed!
::: Checking for sudo... installed!
::: Checking for unzip... installed!
::: Checking for wget... installed!
:::
::: Installing scripts from /etc/.pihole... *** ERROR: Local repo not found, exiting.
::: Control all PiHole specific functions!
:::
::: Usage: pihole [options]
::: Add -h after -w (whitelist), -b (blacklist), or -c (chronometer) for more information on usage
:::
::: Options:
::: -w, whitelist Whitelist domains
::: -b, blacklist Blacklist domains
::: -d, debug Start a debugging session if having trouble
::: -f, flush Flush the pihole.log file
::: -up, updatePihole Update Pi-hole
::: -g, updateGravity Update the list of ad-serving domains
::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it
::: -c, chronometer Calculates stats and displays to an LCD
::: -h, help Show this help dialog
::: -v, version Show current versions
::: -q, query Query the adlists for a specific domain
::: uninstall Uninstall Pi-Hole from your system :(!
::: status Is Pi-Hole Enabled or Disabled
::: enable Enable Pi-Hole DNS Blocking
::: disable Disable Pi-Hole DNS Blocking
::: restartdns Restart dnsmasq
I tried re-running several times, no go.
Any ideas?
Thanks!
Do you have any files in /etc/.pihole?
I do:
-rw-r--r--. 1 root root 3027 Dec 21 21:09 adlists.default
drwxr-xr-x. 6 root root 4096 Dec 21 21:09 advanced
drwxr-xr-x. 2 root root 48 Dec 21 21:09 automated install
-rwxr-xr-x. 1 root root 20 Dec 21 21:09 autotest
drwxr-xr-x. 2 root root 46 Dec 21 21:09 block hulu ads
-rw-r--r--. 1 root root 2363 Dec 21 21:09 CONTRIBUTING.md
-rwxr-xr-x. 1 root root 12517 Dec 21 21:09 gravity.sh
-rw-r--r--. 1 root root 18025 Dec 21 21:09 LICENSE
-rwxr-xr-x. 1 root root 8380 Dec 21 21:09 pihole
-rw-r--r--. 1 root root 10394 Dec 21 21:09 README.md
-rw-r--r--. 1 root root 56 Dec 21 21:09 requirements.txt
drwxr-xr-x. 2 root root 4096 Dec 21 21:09 test
Thanks, can you do a ls -lac on that directory and let's check if you have a .git directory. Also if you can cd into that directory and do a git status that would help us narrow down if or where the bug may be located.
Seems like the folder is there:
drwxr-xr-x. 9 root root 4096 Dec 21 21:09 .
drwxr-xr-x. 84 root root 8192 Dec 21 21:09 ..
-rw-r--r--. 1 root root 3027 Dec 21 21:09 adlists.default
drwxr-xr-x. 6 root root 4096 Dec 21 21:09 advanced
drwxr-xr-x. 2 root root 48 Dec 21 21:09 automated install
-rwxr-xr-x. 1 root root 20 Dec 21 21:09 autotest
drwxr-xr-x. 2 root root 46 Dec 21 21:09 block hulu ads
-rw-r--r--. 1 root root 2363 Dec 21 21:09 CONTRIBUTING.md
drwxr-xr-x. 8 root root 4096 Dec 21 21:09 .git
-rw-r--r--. 1 root root 686 Dec 21 21:09 .gitattributes
drwxr-xr-x. 2 root root 61 Dec 21 21:09 .github
-rw-r--r--. 1 root root 59 Dec 21 21:09 .gitignore
-rwxr-xr-x. 1 root root 12517 Dec 21 21:09 gravity.sh
drwxr-xr-x. 2 root root 34 Dec 21 21:09 .idea
-rw-r--r--. 1 root root 18025 Dec 21 21:09 LICENSE
-rwxr-xr-x. 1 root root 8380 Dec 21 21:09 pihole
-rw-r--r--. 1 root root 649 Dec 21 21:09 .pullapprove.yml
-rw-r--r--. 1 root root 10394 Dec 21 21:09 README.md
-rw-r--r--. 1 root root 56 Dec 21 21:09 requirements.txt
drwxr-xr-x. 2 root root 4096 Dec 21 21:09 test
-rw-r--r--. 1 root root 137 Dec 21 21:09 .travis.yml
git status results in this:
[root@machine .git]# git status
fatal: This operation must be run in a work tree
Also, just checked and Pi-Hole appears to be running the latest V2.10 and is indeed blocking ads.
Just for a sanity check, can you run pihole -r and see if you can go through a complete install without any errors, that would make sure that things are functional and this is just a cosmetic issue with the display output for install logs.
Sorry, I forgot to show the git status, edited post above.
Running pihole -r shows the same error as mentioned in the first post:
[root@machine opt]# pihole -r
:::
::: You are root.
::: Repair option selected.
::: Verifying free disk space...
:::
::: yum update has not been run today. Running now... done!
:::
::: Checking yum for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with Pi-hole installation...
::: Checking for git... installed!
::: Checking for iproute... installed!
::: Checking for net-tools... installed!
::: Checking for newt... installed!
::: Checking for procps-ng... installed!
::: --reconfigure passed to install script. Not downloading/updating local repos
::: Checking for bc... installed!
::: Checking for bind-utils... installed!
::: Checking for cronie... installed!
::: Checking for curl... installed!
::: Checking for dnsmasq... installed!
::: Checking for epel-release... installed!
::: Checking for findutils... installed!
::: Checking for lighttpd... installed!
::: Checking for lighttpd-fastcgi... installed!
::: Checking for nmap-ncat... installed!
::: Checking for php... installed!
::: Checking for php-common... installed!
::: Checking for php-cli... installed!
::: Checking for sudo... installed!
::: Checking for unzip... installed!
::: Checking for wget... installed!
:::
::: Installing scripts from /etc/.pihole... *** ERROR: Local repo not found, exiting.
::: Control all PiHole specific functions!
:::
::: Usage: pihole [options]
::: Add -h after -w (whitelist), -b (blacklist), or -c (chronometer) for more information on usage
:::
::: Options:
::: -w, whitelist Whitelist domains
::: -b, blacklist Blacklist domains
::: -d, debug Start a debugging session if having trouble
::: -f, flush Flush the pihole.log file
::: -up, updatePihole Update Pi-hole
::: -g, updateGravity Update the list of ad-serving domains
::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it
::: -c, chronometer Calculates stats and displays to an LCD
::: -h, help Show this help dialog
::: -v, version Show current versions
::: -q, query Query the adlists for a specific domain
::: uninstall Uninstall Pi-Hole from your system :(!
::: status Is Pi-Hole Enabled or Disabled
::: enable Enable Pi-Hole DNS Blocking
::: disable Disable Pi-Hole DNS Blocking
::: restartdns Restart dnsmasq
Okay, I'm going to tag this potential bug and self assign to get some more details on some internal tests. Are there any symptoms that you are noticing, like it's not working or it's slow or other error messages? And please update this thread if you find things are going odd in the next few days.
Thanks so much for a crazy fast response.
Previously running the script showed additional tasks like SElinux label refesh along with update to ad list and this time it did not so I assumed not all was complete after that error, but most likely its intended that way.
I am looking around right now and checking the log file. I will report with findings.
Also, holy smokes, this update is amazing! You guys rock pretty hard.
Thanks for the complements, we usually have one or two folks around when we do a release just to catch any issues that may have come out and need to be addressed before they get too far. We'll be doing some major changes to the SELinux portion here coming up, to tighten up some of the rulesets, and possible give the user the option to handle installing the modules themselves so that they know exactly what contexts are being assigned to the files.
Thats great to hear, this will force me to actually learn SElinux vs skimming over man pages.
Lol, just changed over to Fedora from Win10, quite the learning curve.
I really would like to try Fedora myself!
2 issues that i see so far and please tell me if I need to open separate issue tickets for these.
They may be known issues that have existed for a while, (the whitelist bug sounds familiar.) But for the sake of tracking and making sure we don't lose anything, can you open new issues with those items so we can tackle them and properly track the resolutions?
Definitely, thank you.
@Mukrosz Have you done this already? I don't see new issues on the AdminLTE repository. Both of the issues you mention are known and affect the Fedora-like line of operation systems. I know what causes both of them (missing path information for user lighttpd when using sudo) but haven't had the time to look into them since they don't appear to be too easy (given my limited knowledge of Fedora's specialties).
Sorry, I haven't yet. I will do so shortly.
EDIT: Just created it but seems like I foolishly created it under Pi-Hole. Please forgive me and move if possible. https://github.com/pi-hole/pi-hole/issues/1007
No, we cannot move them between different repositories, but it is fine - the issue you are reporting actually isn't an issue of the web interface (although looks like one).
Same problem here, clean lean machine, and the same error.
Even after creating the folder /etc/pihole on forehand didn't help.
Which OS?
I'm running into a similar issue on my raspbian install.
The output of git status in /etc/.pihole shows this:
pi@raspberrypi /etc/.pihole $ git status
# On branch master
nothing to commit (working directory clean)
And the cat of my install.log shows this:
pi@raspberrypi /etc/.pihole $ cat /etc/pihole/install.log
::: Checking if user 'pihole' exists...
::: User 'pihole' already exists
:::
::: Installing scripts from /etc/.pihole... *** ERROR: Local repo not found, exiting.
I was about to complete the install on raspbian by doing the following
Seems like a fair amount of bugs on the latest branch. Is there a "stable" branch that I can use?
CentOS 7 default install, same issues as described above.
CentOS (we have found) does not understand the shorthand version of git that we use. Updated in #1009 and will be in next release, you can manually update the install command with that code if you wish to try to install, it is also now in the development branch.
With the patch applied in #1009 im stil expierencing issues;
::: Installing scripts from /etc/.pihole...install: failed to access ‘/opt/pihole/’: No such file or directory
grep: /etc/pihole/setupVars.conf: No such file or directory
::: Restarting services...
####### FUNCTIONS ##########
is_repo() {
local directory="${1}"
curdir=$PWD; cd $directory; git status --short &> /dev/null; rc=$?; cd $curdir
return $rc
}
Did you do a pihole -r and reinstall, it looks like the missing /opt/pihole is because the initial install didn't move the scripts to that location. That appears to be a new error. Can you do a reinstall with the updated function? There may be another location that needs adjustment, but let's see if we can track this first one down.
No. This is a clean install (CentOS 7).
Getting the following error;
::: Installing scripts from /etc/.pihole...install: failed to access ‘/opt/pihole/’: No such file or directory
grep: /etc/pihole/setupVars.conf: No such file or directory
::: Restarting services...
If i leave the setup script to the old revision and with a updated git (build from source) im getting the same error.
The missing /opt/pihole was fixed in #1005
Just do the following and try again:
mkdir -p /opt/pihole
My OS is Debian 7.
After manually creating /opt/pihole and the fix from #1005 and #1009 it works on CentOS 7.
Thanks!
Still an isseu, but looking at the install script (excuse me I'm trying to help) I see 2 different Local_Repo folders.
/etc/.pihole should be the only repo folder.
/opt/pihole is an installation directory. i.e where the scripts go...
After doing a bit more debugging found it to be the 'git -C' option that causes the problem why I can't install Pi-Hole.
I'm not versed in git language, will have to wait for an fix.
Oh Yes, we already have a fix for this problem. See here.
The issue is that CentOS 7.3 is shipping a super-old version of git which doesn't not yet understand the new standard-syntax of git fully.
That fixed it, It installed.
Now I have to get home to test it :)
Thank you for your help.