Rasperry PI HailoRT install wrong driver version

I am trying to setup a clean enviroment for my PI5 + Hailo Hat
I was told to install version 4.21 to be compatable ith the model we have.

-rw-r–r-- 1 pi pi 6874760 Aug 9 10:23 hailort_4.21.0_arm64.deb
-rw-r–r-- 1 pi pi 6874760 Aug 9 10:23 hailort-pcie-driver_4.21.0_all.deb

I am trying to follow the guide.
After installing build essentials and stuff the guide I run
sudo dpkg -i hailort_4.21.0_arm64.deb hailort-pcie-driver_4.21.0_all.deb
But when I reboot I see it installed 4.20, not 4.21:

(base) pi@raspberry:~/hailo-software $ dmesg | grep hailo
[ 2.035229] hailo: Init module. driver version 4.20.0
[ 2.035311] hailo 0001:01:00.0: Probing on: 1e60:2864…
[ 2.035315] hailo 0001:01:00.0: Probing: Allocate memory for device extension, 13184
[ 2.035327] hailo 0001:01:00.0: enabling device (0000 → 0002)
[ 2.035332] hailo 0001:01:00.0: Probing: Device enabled
[ 2.035347] hailo 0001:01:00.0: Probing: mapped bar 0 - 000000002762d50a 16384
[ 2.035351] hailo 0001:01:00.0: Probing: mapped bar 2 - 00000000923f8498 4096
[ 2.035355] hailo 0001:01:00.0: Probing: mapped bar 4 - 00000000faaf9d40 16384
[ 2.035358] hailo 0001:01:00.0: Probing: Setting max_desc_page_size to 16384, (page_size=16384)
[ 2.035366] hailo 0001:01:00.0: Probing: Enabled 64 bit dma
[ 2.035369] hailo 0001:01:00.0: Probing: Using userspace allocated vdma buffers
[ 2.035371] hailo 0001:01:00.0: Disabling ASPM L0s
[ 2.035374] hailo 0001:01:00.0: Successfully disabled ASPM L0s
[ 2.035454] hailo 0001:01:00.0: Writing file hailo/hailo8_fw.bin
[ 2.037460] Failed to write file hailo/hailo8_fw.bin
[ 2.037466] hailo 0001:01:00.0: Failed writing NNC firmware files. err -2
[ 2.037469] hailo 0001:01:00.0: FW loaded, took 2 ms
[ 2.037517] hailo 0001:01:00.0: Firmware load failed
[ 2.037519] hailo 0001:01:00.0: Failed activating board -2
[ 2.037536] hailo 0001:01:00.0: probe with driver hailo failed with error -2

Am I doing something wrong? Seems strange to see this error on the very first step…

(base) pi@raspberry:~ $ cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 12 (bookworm)”
NAME=“Debian GNU/Linux”
VERSION_ID=“12”
VERSION=“12 (bookworm)”
VERSION_CODENAME=bookworm
ID=debian
HOME_URL=“``https://www.debian.org/”
SUPPORT_URL=“``https://www.debian.org/support”
BUG_REPORT_URL=“``https://bugs.debian.org/”
(base) pi@raspberry:~ $ uname -a
Linux raspberry 6.12.25+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux
(base) pi@raspberry:~ $

Hey @user281,

Welcome to the Hailo Community!

The problem is that the HailoRT driver is already embedded in the RPi kernel (version 4.20), so you need to completely remove the existing one before installing the new version. Here’s what worked for me:

Step 1: Remove existing Hailo packages

sudo apt purge hailo-all hailort hailofw hailo-tappas-core hailort-pcie-driver

Step 2: Clean up kernel modules You’ll want to find and remove all the old Hailo kernel modules:

sudo find /lib/modules -type f \( -name 'hailo*.ko' -o -name 'hailo*.ko.xz' \) -print -delete

Step 3: Remove leftover directories Clean up any remaining Hailo directories:

sudo find /lib/modules -type d -name 'hailo' -print -exec rm -rf {} +

Step 4: Update module dependencies Rebuild the module dependency database:

sudo depmod -a

Step 5: Update initramfs (if you’re on Debian/Raspbian) This step updates the initial RAM filesystem:

sudo update-initramfs -u

One more thing - I’d recommend installing the driver first, then HailoRT. So you might want to switch the order in your installation command.

Hope this helps! Let me know if you run into any issues.