Install libserial-dev by entering the following commands in the terminal:
sudo apt update sudo apt install libserial-dev
Description:
Serial port programming in C++ -- development files
A collection of C++ classes which allow the serial port on POSIX systems to be accessed like an iostream object. Special functions are provided for setting various parameters of the serial port such as the baud rate, character size, flow control and other. . This package contains the development libraries and headers
Homepage: http://libserial.sourceforge.net
Version: 0.6.0~rc2+svn122-4build1
Section: universe/libdevel