Install libserialport-dev by entering the following commands in the terminal:
sudo apt update sudo apt install libserialport-dev
Crossplatform serial port handling library - development files
libserialport is a minimal, cross-platform shared library that is intended to take care of the OS-specific details when writing software that uses serial ports. . This package contains the header files and other development files.