Setup ok but pihole doesn't work

I installed pihole on my bananapi, everything went ok while installing but web gui is saying forbidden and pihole command not found in terminal.

is there a diffrerent way to insall pihole?

root@bananapipro:~# uname -a
Linux bananapipro 5.4.28-sunxi #20.02.7 SMP Sat Mar 28 14:32:15 CET 2020 armv7l armv7l armv7l GNU/Linux

resolv.conf;

# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 1.1.1.1

nano /etc/network/interfaces

source /etc/network/interfaces.d/*
# Network is managed by Network manager
auto eth0
iface eth0 inet static
    address 192.168.2.2
    netmask 255.255.255.0
    gateway 192.168.2.1
    dns-nameservers 8.8.8.8 8.8.4.4

setup progress;

root@bananapipro:~# curl -sSL https://install.pi-hole.net | bash

  [✓] Root user check

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

  [✓] Disk space check
  [✓] Update local cache of available packages

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

  [i] Installer Dependency checks...
  [✓] Checking for apt-utils
  [✓] Checking for dialog
  [✓] Checking for debconf
  [i] Checking for dhcpcd5 (will be installed)
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for whiptail
  [i] Using Google (ECS)
  [✓] Set IP address to 192.168.2.2
  You may need to restart after the install is complete
  [i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled
  [i] IPv4 address: 192.168.2.2/24
  [i] IPv6 address:
  [i] Web Interface On
  [i] Web Server On
  [i] Logging On.
  [✗] Check for existing repository in /etc/.pihole
  [✓] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole

  [✗] Check for existing repository in /var/www/html/admin
  [✓] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin

  [i] Main Dependency checks...
  [✓] Checking for cron
  [✓] Checking for curl
  [✓] Checking for dnsutils
  [✓] Checking for iputils-ping
  [✓] Checking for lsof
  [i] Checking for netcat (will be installed)
  [✓] Checking for psmisc
  [✓] Checking for sudo
  [✓] Checking for unzip
  [✓] Checking for wget
  [i] Checking for idn2 (will be installed)
  [i] Checking for sqlite3 (will be installed)
  [✓] Checking for libcap2-bin
  [i] Checking for dns-root-data (will be installed)
  [✓] Checking for resolvconf
  [✓] Checking for libcap2
  [i] Checking for lighttpd (will be installed)
  [i] Checking for php-common (will be installed)
  [i] Checking for php-cgi (will be installed)
  [i] Checking for php-sqlite3 (will be installed)
root@bananapipro:~#

Pi-hole is not installed. Something failed in the package installation process. You can try the curl again in verbose mode curl -sSL https://install.pi-hole.net | sudo bash -x and look for the last line that contains the word apt to see what packages the installer was trying to get. Run that apt command separately and see what errors are produced.

hi dan, thanks for the reply.

here is last line of the result of curl -sSL https://install.pi-hole.net | sudo bash -x;

  • debconf-apt-progress -- apt-get --yes --no-install-recommends install netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3
    root@bananapipro:~# pihole

errors for the last line;

Unknown option: yes
Unknown option: no-install-recommends
Unknown option: yes
Unknown option: no-install-recommends

I tried to install packages and here are the results;

root@bananapipro:~# apt-get install netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3
Reading package lists... Done
Building dependency tree
Reading state information... Done
dns-root-data is already the newest version (2018013001).
php-cgi is already the newest version (1:7.2+60ubuntu1).
php-common is already the newest version (1:60ubuntu1).
php-sqlite3 is already the newest version (1:7.2+60ubuntu1).
netcat is already the newest version (1.10-41.1).
sqlite3 is already the newest version (3.22.0-1ubuntu0.3).
idn2 is already the newest version (2.0.4-1.1ubuntu0.2).
lighttpd is already the newest version (1.4.45-1ubuntu3.18.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
9 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]

I also tried with debian stretch and intallation script stopped same line. there is something wrong at the script.

By default, NetworkManager has its own instance of dnsmasq, which might result in conflicts with Pi-hole if run on the same machine.

Uninstalling it could be an option, but if you are absolutely dependent on NetworkManager, you could first try to disable its dnsmasq by commenting the corresponding line in /etc/NetworkManager/NetworkManager.conf like this:

# dns=dnsmasq

there is no line like;

dns=dnsmasq

NetworkManager.conf;

[main]
dns=default
rc-manager=file
plugins=ifupdown,keyfile

[ifupdown]
managed=true

[device]
wifi.scan-rand-mac-address=no

I comment out dns=default but result is same.

stopped at;

[i] Checking for php-sqlite3 (will be installed)

What does sudo apt-get --yes --no-install-recommends install netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3 output?

Reading package lists... Done
Building dependency tree
Reading state information... Done
dns-root-data is already the newest version (2018013001).
php-cgi is already the newest version (1:7.2+60ubuntu1).
php-common is already the newest version (1:60ubuntu1).
php-sqlite3 is already the newest version (1:7.2+60ubuntu1).
netcat is already the newest version (1.10-41.1).
sqlite3 is already the newest version (3.22.0-1ubuntu0.3).
idn2 is already the newest version (2.0.4-1.1ubuntu0.2).
lighttpd is already the newest version (1.4.45-1ubuntu3.18.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
9 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.

That's all?

continues like this;

Creating config file /etc/php/7.2/mods-available/calendar.ini with new version

Creating config file /etc/php/7.2/mods-available/ctype.ini with new version

Creating config file /etc/php/7.2/mods-available/exif.ini with new version

Creating config file /etc/php/7.2/mods-available/fileinfo.ini with new version

Creating config file /etc/php/7.2/mods-available/ftp.ini with new version

Creating config file /etc/php/7.2/mods-available/gettext.ini with new version

Creating config file /etc/php/7.2/mods-available/iconv.ini with new version

Creating config file /etc/php/7.2/mods-available/pdo.ini with new version

Creating config file /etc/php/7.2/mods-available/phar.ini with new version

Creating config file /etc/php/7.2/mods-available/posix.ini with new version

Creating config file /etc/php/7.2/mods-available/shmop.ini with new version

Creating config file /etc/php/7.2/mods-available/sockets.ini with new version

Creating config file /etc/php/7.2/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/7.2/mods-available/sysvsem.ini with new version

Creating config file /etc/php/7.2/mods-available/sysvshm.ini with new version

Creating config file /etc/php/7.2/mods-available/tokenizer.ini with new version
Setting up php7.2-sqlite3 (7.2.24-0ubuntu0.18.04.3) ...

Creating config file /etc/php/7.2/mods-available/sqlite3.ini with new version

Creating config file /etc/php/7.2/mods-available/pdo_sqlite.ini with new version
Setting up php7.2-readline (7.2.24-0ubuntu0.18.04.3) ...

Creating config file /etc/php/7.2/mods-available/readline.ini with new version
Setting up php7.2-json (7.2.24-0ubuntu0.18.04.3) ...

Creating config file /etc/php/7.2/mods-available/json.ini with new version
Setting up php-sqlite3 (1:7.2+60ubuntu1) ...
Setting up php7.2-opcache (7.2.24-0ubuntu0.18.04.3) ...

Creating config file /etc/php/7.2/mods-available/opcache.ini with new version
Setting up php7.2-cli (7.2.24-0ubuntu0.18.04.3) ...
update-alternatives: using /usr/bin/php7.2 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.2 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.2 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.2/cli/php.ini with new version
Setting up php7.2-cgi (7.2.24-0ubuntu0.18.04.3) ...
update-alternatives: using /usr/bin/php-cgi7.2 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php7.2 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode

Creating config file /etc/php/7.2/cgi/php.ini with new version
Setting up php-cgi (1:7.2+60ubuntu1) ...
W: APT had planned for dpkg to do more than it reported back (24 vs 28).
   Affected packages: php7.2-common:armhf

It looks like your OS is broken in some way.

This is an OS level issue.

This also is an OS level issue.

What distribution and version are you installing on?

ubuntu based armbian bionic kernel 5.4

also tried on debian based armbian strech kernel 5.4

Armbian has always worked fine from my tests. I don't really know why the apt commands are failing, it's not something we have control over, we just call apt-get to install the system packages.

I'm using armbian very long time. in command line apt or apt-get commands never failed.

You may have success with a solution on armbian forums. This could be a software problem, or perhaps a hardware problem on your Pi (perhaps a bad or dying SD card, for example).

I think I can't use pihole. there is nothing else to do about. thanks to all for your effort.

Sorry that you've come to that conclusion. We have many users on Armbian (myself included).

I did it with the command below;

apt-get install netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3 -y && curl -sSL https://install.pi-hole.net | sudo bash -x

I think script dies because of debconf-apt-progress command. I passed this command with preinstalling the netcat idn2 sqlite3 dns-root-data lighttpd p hp-common php-cgi php-sqlite3 before running script.