3

This morning I tried to use tesseract and I'm getting the following error messages:

$ tesseract --list-langs
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
List of available languages (6):
eng
fra
ita
mlt
osd
spa

I tried sudo apt purge tesseract* followed by a reinstall of tesseract-ocr and language files, but the error message remains.

Last week, I manually installed leptonica-1.7.8 and jbig2-enc libraries to use with ocrmypdf and everything was working fine.

Any clues on how to proceed to solve this issue?

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
To Do
  • 15,172
  • 12
  • 70
  • 116
  • 1
    According to [this SO answer](https://stackoverflow.com/questions/33659458/tesseract-image-issue), you have to first install `libjpeg`, `libtiff`, `libpng` and then compile `leptonica`. – BeastOfCaerbannog Oct 07 '19 at 12:15
  • 3
    I had read that post, but it was not clear which packages to install. Then I found in the documentation what to install: `sudo apt install libpng-dev libtiff5-dev libwebp-dev libopenjp2-7-dev libgif-dev`. Then I recompiled leptonica and everything worked. However it still remains a mystery why I didn't have problems the first time round. – To Do Oct 07 '19 at 16:28
  • @ToDo Tiff, probably is optional. Even with some errors, tesseract-ocr was working. – user.dz Oct 14 '19 at 19:36
  • It wasn't for me. No Tesseract operations where being performed. – To Do Oct 15 '19 at 06:46

0 Answers0