Install libpstreams-dev by entering the following commands in the terminal:
sudo apt update sudo apt install libpstreams-dev
C++ iostream interface to POSIX process I/O
PStreams allows you to run another program from your C++ application and to transfer data between the two programs, similar to shell pipelines. The PStreams class works like a wrapper for the POSIX.2 functions popen(3) and pclose(3) (although it doesn't actually use them), using a C++ iostreams interface, instead of C's stdio library. Thus, PStreams makes it possible to run an external program and handle its stdin, stdout, and stderr just like you would handle any other C++ iostream.