I hope this short post will help anybody who is looking to resolve that particular problem on Raspberry Pi 5. The command below was NOT a problem n Raspberry 4.
When I tried to:
sudo apt install -y libqt5serialport5-dev
it did not work.
What I found, instead, you need to type:
sudo apt-get install libqt5serialport5-dev
Don’t ask me why… 🙂