I'd suggest to install ocrmypdf in Ubuntu, Debian, etc. I happily use it since years for my scanned books OCR needs and can only recommend it. It relies on tesseract as the OCR backend and produces excellent PDF documents from either scanned images or already existing pdf files as input.
ocrmypdf.readthedocs.io/en/latest/index.html
EDIT:
I wrote about it before here:
mobileread.com/forums/showthread.php?t=294101