I finally got ./configure passed. The solution is in the "Common Errors" section of the compiling guide <https://github.com/tesseract-ocr/tesseract/wiki/Compiling>, quoted here:
If configure fails with such error "configure: error: Leptonica 1.74 or > higher is required." Try to install libleptonica-dev package. > If you are sure you have installed leptonica (for example in /usr/local) > then probably pkg-config is not looking at your install folder (check with > pkg-config --variable pc_path pkg-config). > A solution is to set PKG_CONFIG_PATH : example : > PKG_CONFIG_PATH=/usr/local/lib/pkgconfig > What I did was (assuming leptonica 1.76.0 installed successfully): export PKG_CONFIG_PATH=$HOME/miniconda3/envs/cheetoh/lib/pkgconfig ./configure --prefix=$HOME/miniconda3/envs/cheetoh Ning -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/f3ea4619-5be3-48f2-8fa0-7a000945edad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

