New install on Raspberry Pi OS on ESXi Virtual Machine fails to install correctly

I don't know, it's there and we confirmed it's there.

Beats me man

What does

file /usr/bin/pihole-FTL

show?

pi@raspberry:/usr/bin $ file /usr/bin/pihole-FTL
/usr/bin/pihole-FTL: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a1a24fd590dfe9279b6f185f29aca16137b5ff81, with debug_info, not stripped

Sorry, I'm really at a loss. I don't know what is going on.

Do you think it could have something to do with the fact that I'm running Raspberry OS on a virtual machine on an ESXi server? I'm grasping at straws I suppose.

I guess it may be possible.

We intentionally use the full path for the binary so we don't have to worry about the PATH being incorrect, or a PATH changing if the command is called with sudo. I'm not sure why file finds it but the other scripts can't find it.

You could try

sudo bash -vx /opt/pihole/updatecheck.sh

And walk through all the lines (or post them here) to really see what exactly is being sent to the shell.

pi@raspberry:/usr/bin $ sudo bash -vx /opt/pihole/updatecheck.sh
#!/usr/bin/env bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Checks for local or remote versions and branches
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.

# Credit: https://stackoverflow.com/a/46324904
function json_extract() {
    local key=$1
    local json=$2

    local string_regex='"([^"\]|\\.)*"'
    local number_regex='-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?'
    local value_regex="${string_regex}|${number_regex}|true|false|null"
    local pair_regex="\"${key}\"[[:space:]]*:[[:space:]]*(${value_regex})"

    if [[ ${json} =~ ${pair_regex} ]]; then
        echo $(sed 's/^"\|"$//g' <<< "${BASH_REMATCH[1]}")
    else
        return 1
    fi
}

function get_local_branch() {
    # Return active branch
    cd "${1}" 2> /dev/null || return 1
    git rev-parse --abbrev-ref HEAD || return 1
}

function get_local_version() {
    # Return active branch
    cd "${1}" 2> /dev/null || return 1
    git describe --long --dirty --tags 2> /dev/null || return 1
}

# Source the setupvars config file
# shellcheck disable=SC1091
. /etc/pihole/setupVars.conf
+ . /etc/pihole/setupVars.conf
PIHOLE_INTERFACE=eth0
++ PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=10.0.1.253/24
++ IPV4_ADDRESS=10.0.1.253/24
IPV6_ADDRESS=
++ IPV6_ADDRESS=
PIHOLE_DNS_1=1.1.1.1
++ PIHOLE_DNS_1=1.1.1.1
PIHOLE_DNS_2=1.0.0.1
++ PIHOLE_DNS_2=1.0.0.1
QUERY_LOGGING=true
++ QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
++ INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
++ INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true
++ LIGHTTPD_ENABLED=true
CACHE_SIZE=10000
++ CACHE_SIZE=10000
WEBPASSWORD=737cc3d1f69cba276859860e7777c9155021ad5964bf27a0efc97868dee663a3
++ WEBPASSWORD=737cc3d1f69cba276859860e7777c9155021ad5964bf27a0efc97868dee663a3

if [[ "$2" == "remote" ]]; then

    if [[ "$3" == "reboot" ]]; then
        sleep 30
    fi

    GITHUB_VERSION_FILE="/etc/pihole/GitHubVersions"

    GITHUB_CORE_VERSION="$(json_extract tag_name "$(curl -s 'https://api.github.com/repos/pi-hole/pi-hole/releases/latest' 2> /dev/null)")"
    echo -n "${GITHUB_CORE_VERSION}" > "${GITHUB_VERSION_FILE}"
    chmod 644 "${GITHUB_VERSION_FILE}"

    if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
        GITHUB_WEB_VERSION="$(json_extract tag_name "$(curl -s 'https://api.github.com/repos/pi-hole/AdminLTE/releases/latest' 2> /dev/null)")"
        echo -n " ${GITHUB_WEB_VERSION}" >> "${GITHUB_VERSION_FILE}"
    fi

    GITHUB_FTL_VERSION="$(json_extract tag_name "$(curl -s 'https://api.github.com/repos/pi-hole/FTL/releases/latest' 2> /dev/null)")"
    echo -n " ${GITHUB_FTL_VERSION}" >> "${GITHUB_VERSION_FILE}"

else

    LOCAL_BRANCH_FILE="/etc/pihole/localbranches"

    CORE_BRANCH="$(get_local_branch /etc/.pihole)"
    echo -n "${CORE_BRANCH}" > "${LOCAL_BRANCH_FILE}"
    chmod 644 "${LOCAL_BRANCH_FILE}"

    if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
        WEB_BRANCH="$(get_local_branch /var/www/html/admin)"
        echo -n " ${WEB_BRANCH}" >> "${LOCAL_BRANCH_FILE}"
    fi

    FTL_BRANCH="$(pihole-FTL branch)"
    echo -n " ${FTL_BRANCH}" >> "${LOCAL_BRANCH_FILE}"

    LOCAL_VERSION_FILE="/etc/pihole/localversions"

    CORE_VERSION="$(get_local_version /etc/.pihole)"
    echo -n "${CORE_VERSION}" > "${LOCAL_VERSION_FILE}"
    chmod 644 "${LOCAL_VERSION_FILE}"

    if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
        WEB_VERSION="$(get_local_version /var/www/html/admin)"
        echo -n " ${WEB_VERSION}" >> "${LOCAL_VERSION_FILE}"
    fi

    FTL_VERSION="$(pihole-FTL version)"
    echo -n " ${FTL_VERSION}" >> "${LOCAL_VERSION_FILE}"

fi
+ [[ '' == \r\e\m\o\t\e ]]
+ LOCAL_BRANCH_FILE=/etc/pihole/localbranches
++ get_local_branch /etc/.pihole
++ cd /etc/.pihole
++ git rev-parse --abbrev-ref HEAD
+ CORE_BRANCH=master
+ echo -n master
+ chmod 644 /etc/pihole/localbranches
+ [[ true == true ]]
++ get_local_branch /var/www/html/admin
++ cd /var/www/html/admin
++ git rev-parse --abbrev-ref HEAD
+ WEB_BRANCH=master
+ echo -n ' master'
++ pihole-FTL branch
/opt/pihole/updatecheck.sh: line 77: /usr/bin/pihole-FTL: No such file or directory
+ FTL_BRANCH=
+ echo -n ' '
+ LOCAL_VERSION_FILE=/etc/pihole/localversions
++ get_local_version /etc/.pihole
++ cd /etc/.pihole
++ git describe --long --dirty --tags
+ CORE_VERSION=v5.2.1-0-g0d8ece1
+ echo -n v5.2.1-0-g0d8ece1
+ chmod 644 /etc/pihole/localversions
+ [[ true == true ]]
++ get_local_version /var/www/html/admin
++ cd /var/www/html/admin
++ git describe --long --dirty --tags
+ WEB_VERSION=v5.2.1-0-g8ac95be
+ echo -n ' v5.2.1-0-g8ac95be'
++ pihole-FTL version
/opt/pihole/updatecheck.sh: line 91: /usr/bin/pihole-FTL: No such file or directory
+ FTL_VERSION=
+ echo -n ' '
pi@raspberry:/usr/bin $

Does /usr/bin/pihole-FTL version display anything?

pi@raspberry:/usr/bin $ /usr/bin/pihole-FTL version
-bash: /usr/bin/pihole-FTL: No such file or directory

Okay, in the /usr/bin/ directory do

ls pihole-FTL

and

./pihole-FTL version and ./pihole-FTL -vv

The first one:

pi@raspberry:/usr/bin $ ls pihole-FTL
pihole-FTL

The second two:

pi@raspberry:/usr/bin $ ./pihole-FTL version
-bash: ./pihole-FTL: No such file or directory
pi@raspberry:/usr/bin $ ./pihole-FTL -vv
-bash: ./pihole-FTL: No such file or directory
pi@raspberry:/usr/bin $

Bizarre.

What about

type pihole-FTL

Try

hash pihole-FTL

And then pihole-FTL -vv

pi@raspberry:/usr/bin $ type pihole-FTL
pihole-FTL is hashed (/usr/bin/pihole-FTL)
pi@raspberry:/usr/bin $ hash pihole-FTL
pi@raspberry:/usr/bin $ pihole-FTL -vv
-bash: /usr/bin/pihole-FTL: No such file or directory

Okay,

hash -d pihole-FTL

and then

which pihole-FTL
pi@raspberry:/usr/bin $ hash -d pihole-FTL
pi@raspberry:/usr/bin $ which pihole-FTL
/usr/bin/pihole-FTL

And one last try to pihole-FTL -vv

pi@raspberry:/usr/bin $ pihole-FTL -vv
-bash: /usr/bin/pihole-FTL: No such file or directory

I don't think I have any tricks left to throw at it...

@DL6ER is there any possibility output is coming from pihole-FTL?

I found a fix for this issue after dealing with the same setup using the Raspberry desktop OS on an esxi VM.

if you run uname -r -m and dpkg --print-architecture you will most likely get 4.19.0-12-amd64 x86_64 and i386 as discussed in this article:

A solution was to install the libc6:amd64 package manually using apt-get here:

I ran sudo apt install libc6:amd64 and did the pihole install script using bash and it worked without any issue.

2 Likes