How To Install tesseract on Fedora 34

tesseract is Raw OCR Engine Raw OCR Engine

Introduction

In this tutorial we learn how to install tesseract on Fedora 34.

What is tesseract

A commercial quality OCR engine originally developed at HP between 1985 and 1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was open-sourced by HP and UNLV in 2005. tesseract 4.1.1 5.fc34 x86_64 1.3 M tesseract-4.1.1-5.fc34.src.rpm fedora Raw OCR Engine https ASL 2.0 A commercial quality OCR engine originally developed at HP between 1985 and 1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was open-sourced by HP and UNLV in 2005.

We can use yum or dnf to install tesseract on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install tesseract.

Install tesseract on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install tesseract using dnf by running the following command:

sudo dnf -y install tesseract

Install tesseract on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install tesseract using yum by running the following command:

sudo yum -y install tesseract

How To Uninstall tesseract on Fedora 34

To uninstall only the tesseract package we can use the following command:

sudo dnf remove tesseract

tesseract Package Contents on Fedora 34

/usr/bin/tesseract
/usr/lib/.build-id
/usr/lib/.build-id/02
/usr/lib/.build-id/02/16df8af6ea104e3f23fb586604c072be75db6f
/usr/lib/.build-id/d7
/usr/lib/.build-id/d7/2b0013e55f8c5d1fa56e99deb1e1caabe0d790
/usr/lib64/libtesseract.so.4
/usr/lib64/libtesseract.so.4.0.1
/usr/share/doc/tesseract
/usr/share/doc/tesseract/AUTHORS
/usr/share/doc/tesseract/ChangeLog
/usr/share/doc/tesseract/README.md
/usr/share/licenses/tesseract
/usr/share/licenses/tesseract/LICENSE
/usr/share/tesseract
/usr/share/tesseract/tessdata
/usr/share/tesseract/tessdata/configs
/usr/share/tesseract/tessdata/configs/alto
/usr/share/tesseract/tessdata/configs/ambigs.train
/usr/share/tesseract/tessdata/configs/api_config
/usr/share/tesseract/tessdata/configs/bigram
/usr/share/tesseract/tessdata/configs/box.train
/usr/share/tesseract/tessdata/configs/box.train.stderr
/usr/share/tesseract/tessdata/configs/digits
/usr/share/tesseract/tessdata/configs/get.images
/usr/share/tesseract/tessdata/configs/hocr
/usr/share/tesseract/tessdata/configs/inter
/usr/share/tesseract/tessdata/configs/kannada
/usr/share/tesseract/tessdata/configs/linebox
/usr/share/tesseract/tessdata/configs/logfile
/usr/share/tesseract/tessdata/configs/lstm.train
/usr/share/tesseract/tessdata/configs/lstmbox
/usr/share/tesseract/tessdata/configs/lstmdebug
/usr/share/tesseract/tessdata/configs/makebox
/usr/share/tesseract/tessdata/configs/pdf
/usr/share/tesseract/tessdata/configs/quiet
/usr/share/tesseract/tessdata/configs/rebox
/usr/share/tesseract/tessdata/configs/strokewidth
/usr/share/tesseract/tessdata/configs/tsv
/usr/share/tesseract/tessdata/configs/txt
/usr/share/tesseract/tessdata/configs/unlv
/usr/share/tesseract/tessdata/configs/wordstrbox
/usr/share/tesseract/tessdata/pdf.ttf
/usr/share/tesseract/tessdata/tessconfigs
/usr/share/tesseract/tessdata/tessconfigs/batch
/usr/share/tesseract/tessdata/tessconfigs/batch.nochop
/usr/share/tesseract/tessdata/tessconfigs/matdemo
/usr/share/tesseract/tessdata/tessconfigs/msdemo
/usr/share/tesseract/tessdata/tessconfigs/nobatch
/usr/share/tesseract/tessdata/tessconfigs/segdemo
/usr/bin/tesseract
/usr/lib/.build-id
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/4b8b5f17971188f2b81e20924fd0980c65a539
/usr/lib/.build-id/21
/usr/lib/.build-id/21/cf5d49b698f9a1ea219ef7dde3c58a1a7556e6
/usr/lib/libtesseract.so.4
/usr/lib/libtesseract.so.4.0.1
/usr/share/doc/tesseract
/usr/share/doc/tesseract/AUTHORS
/usr/share/doc/tesseract/ChangeLog
/usr/share/doc/tesseract/README.md
/usr/share/licenses/tesseract
/usr/share/licenses/tesseract/LICENSE
/usr/share/tesseract
/usr/share/tesseract/tessdata
/usr/share/tesseract/tessdata/configs
/usr/share/tesseract/tessdata/configs/alto
/usr/share/tesseract/tessdata/configs/ambigs.train
/usr/share/tesseract/tessdata/configs/api_config
/usr/share/tesseract/tessdata/configs/bigram
/usr/share/tesseract/tessdata/configs/box.train
/usr/share/tesseract/tessdata/configs/box.train.stderr
/usr/share/tesseract/tessdata/configs/digits
/usr/share/tesseract/tessdata/configs/get.images
/usr/share/tesseract/tessdata/configs/hocr
/usr/share/tesseract/tessdata/configs/inter
/usr/share/tesseract/tessdata/configs/kannada
/usr/share/tesseract/tessdata/configs/linebox
/usr/share/tesseract/tessdata/configs/logfile
/usr/share/tesseract/tessdata/configs/lstm.train
/usr/share/tesseract/tessdata/configs/lstmbox
/usr/share/tesseract/tessdata/configs/lstmdebug
/usr/share/tesseract/tessdata/configs/makebox
/usr/share/tesseract/tessdata/configs/pdf
/usr/share/tesseract/tessdata/configs/quiet
/usr/share/tesseract/tessdata/configs/rebox
/usr/share/tesseract/tessdata/configs/strokewidth
/usr/share/tesseract/tessdata/configs/tsv
/usr/share/tesseract/tessdata/configs/txt
/usr/share/tesseract/tessdata/configs/unlv
/usr/share/tesseract/tessdata/configs/wordstrbox
/usr/share/tesseract/tessdata/pdf.ttf
/usr/share/tesseract/tessdata/tessconfigs
/usr/share/tesseract/tessdata/tessconfigs/batch
/usr/share/tesseract/tessdata/tessconfigs/batch.nochop
/usr/share/tesseract/tessdata/tessconfigs/matdemo
/usr/share/tesseract/tessdata/tessconfigs/msdemo
/usr/share/tesseract/tessdata/tessconfigs/nobatch
/usr/share/tesseract/tessdata/tessconfigs/segdemo

References

Summary

In this tutorial we learn how to install tesseract on Fedora 34 using yum and dnf.