FTL Engine not update / not installed ?

Hello everyone!
I have Pi-Hole installed on a Raspberry Pi 2 Model B Rev 1.1.
I installed it a few months ago, and it's been working fine until recently when I started noticing that the blocking percentage dropped considerably. When I checked the web interface, the footer displayed a message that FTL needed an update, saying:

Core v6.2.2
FTL v6.2.3 ยท Update available!
Web interface v6.3

If I try to update it (sudo pihole -up), it doesn't update. I also tried repairing the installation (sudo pihole -r), but that didn't solve it either. The errors I see when attempting to update are:

[i] Web Interface: up to date
/etc/.pihole/automated install/basic-install.sh: line 1961: awk: command not found

And further down:

[i] FTL Checks...

[โœ—] This processor architecture is not supported by Pi-hole () [i] Downloading and Installing FTL...curl: (3) bad range in URL position 70:
[โœ—] This processor architecture is not supported by Pi-hole ()
^
[โœ—] Downloading and Installing FTL
[โœ—] This processor architecture is not supported by Pi-hole () not found
[โœ—] FTL Engine not installed

Unable to complete update, please contact Pi-hole Support

The error is the same when I run the repair, except it doesn't show the message about contacting Support.
Any ideas?
Thanks a lot!

Your system is missing awk command.

This is causing an issue and breaking subsequent commands, resulting in a bad URL and curl fails to download the correct FTL file.

Did you intentionally uninstall awk?

Try to reinstall awk with these commands:

sudo apt update
sudo apt install gawk

Then try again.

1 Like

No.
Thnaks for the reply!

xxxxxxxxxxx:~ $ sudo apt update
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

xxxxxxxxxxx:~ $ sudo apt install gawk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package gawk

:face_with_peeking_eye:

Try sudo apt install mawk.

Note:
All supported operating systems has awk installed by default.
Which OS are you using?

1 Like

Thanks!:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
mawk is already the newest version (1.3.4.20200120-3.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Raspbian GNU/Linux 12 (bookworm)

The output above shows awk is already installed.

If the package is installed, but the system can't find it when the script tries to use it, it could be an indication of a corrupted filesystem.

What is the output of awk -V (uppercase V)?

1 Like

Thanks again!

sudo: awk: command not found

I tried again and: -bash: awk: command not found

The mawk package containing the awk command is a "required" package thats installed on all Debian derivatives OOTB:

$ lsb_release -d
No LSB modules are available.
Description:    Raspbian GNU/Linux 12 (bookworm)
$ which awk
/usr/bin/awk
$ readlink -f /usr/bin/awk
/usr/bin/mawk
$ dpkg -S bin/mawk
mawk: /usr/bin/mawk
$ apt list ~prequired
[..]
login/stable,now 1:4.13+dfsg1-1+deb12u1 armhf [installed]
mawk/stable,now 1.3.4.20200120-3.1 armhf [installed]
mount/stable,now 2.38.1-5+deb12u3 armhf [installed]

What do below four output?

printenv PATH

sudo printenv PATH

readlink -f /usr/bin/awk

file /usr/bin/mawk

1 Like

Thanks for the response and explanation! That's strange, it seems like something was accidentally deleted or disappeared

And below one?

update-alternatives --display awk

1 Like

Mine:

lsb_release -d
No LSB modules are available.
Description: Raspbian GNU/Linux 12 (bookworm)
which awk
-bash: which: command not found

readlink -f /usr/bin/awk
(nothing happens)

dpkg -S bin/mawk
mawk: /usr/bin/mawk

/usr/bin/mawk

Sorry, below one shows more details:

update-alternatives --display awk

1 Like
awk - auto mode
  link best version is /usr/bin/mawk
  link currently absent
  link awk is /usr/bin/awk
  slave awk.1.gz is /usr/share/man/man1/awk.1.gz
  slave nawk is /usr/bin/nawk
  slave nawk.1.gz is /usr/share/man/man1/nawk.1.gz
/usr/bin/mawk - priority 5
  slave awk.1.gz: /usr/share/man/man1/mawk.1.gz
  slave nawk: /usr/bin/mawk
  slave nawk.1.gz: /usr/share/man/man1/mawk.1.gz

It says the symlink is "absent".

Try fiddle with below one to restore the necessary symlink.
Most likely you can just press enter when asked to make a selection:

sudo update-alternatives --config awk

If above is able to fix the symlink, it should look like below:

$ readlink /usr/bin/awk
/etc/alternatives/awk
$ readlink -f /usr/bin/awk
/usr/bin/mawk
1 Like

Thx! Done:

update-alternatives: using /usr/bin/mawk to provide /usr/bin/awk (awk) in auto mode

And now:

awk - auto mode
link best version is /usr/bin/mawk
link currently points to /usr/bin/mawk
link awk is /usr/bin/awk
slave awk.1.gz is /usr/share/man/man1/awk.1.gz
slave nawk is /usr/bin/nawk
slave nawk.1.gz is /usr/share/man/man1/nawk.1.gz
/usr/bin/mawk - priority 5
slave awk.1.gz: /usr/share/man/man1/mawk.1.gz
slave nawk: /usr/bin/mawk
slave nawk.1.gz: /usr/share/man/man1/mawk.1.gz

I tried again: sudo pihole -up and get few typicals lines without errors and the last:

\[i\] SELinux not detected
\[โœ—\] Update local cache of available packages
Error: Unable to update package cache. Please try "sudo apt update"
Unable to complete update, please contact Pi-hole Support

Now if I run: sudo pihole -r
I get:

\[i\] SELinux not detected
\[โœ—\] Update local cache of available packages
Error: Unable to update package cache. Please try "sudo apt update"

Did you try that?

1 Like

Run above one first.

1 Like