Cannot install HailoRT 4.18 on Pi5

After following the instructions at:

https://community.hailo.ai/t/upgrade-hailort-to-4-18-on-rpi/2678

and

https://github.com/hailo-ai/tappas/blob/master/docs/installation/manual-install.rst

And finally getting to the part of running:

./install.sh --skip-hailort --target-platform rpi5

I get the following error:

usage: main.py [-h] [--root-path ROOT_PATH] [--dump-requirements] [--apps-list APPS_LIST [APPS_LIST ...]]
               {x86,arm,imx8,rockchip,rpi,any}
main.py: error: argument platform: invalid Platform value: 'rpi5'

If I then use “rpi” instead of “rpi5” I get the issue saying that gcc-9 is not found like:

Apt-Package         gcc-9                             X           Required
Apt-Package         g++-9                             X           Required

@M_S made changes as shown above to common.py and then try to reinstall

Thank you that worked