Tesseract-ocr on Redhat 5

297 views
Skip to first unread message

Steven Heydendahl

unread,
Jun 27, 2017, 4:05:34 PM6/27/17
to tesseract-ocr
Hi all,

Novice here.  I had made a request at my company to install tesseract-ocr on our redhat 5 OS.  

They ended up installing the following:
    rpm -Vp "tesseract-2.04-1.el5.rf.x86_64.rpm"

which is apparently an older version of tesseract.  Now, that completed successfully however, every time I try to run tesseract I get an error message.  Even when I just try to do the following:
    tesseract --version

the response is:
    tesseract:Error:Usage:tesseract imagename outputbase [-l lang] [configfile [[+|-]varfile]...]

and if I try to run tesseract on an image:
    tesseract OCRTest.png text l- eng
    read_variables_file:Can't open /usr/share/tesseract/tessdata/configs/engUnable to load unicharset file /usr/share/tesseract/tessdata/eng.unicharset


I do not know if this was a botched install, if we are missing dependencies, or if tesseract is just not compatible with redhat 5.  Any help is greatly appreciated!

Thanks,
Steve

Zdenko Podobný

unread,
Jun 27, 2017, 4:07:59 PM6/27/17
to tesser...@googlegroups.com
2.04 is too old.
Please ask install 3.05 + language data (at least eng and osd)

Zdenko

--
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 tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
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/7b21b154-f878-4d87-80f2-2458093fed7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Steven Heydendahl

unread,
Jun 27, 2017, 4:09:48 PM6/27/17
to tesseract-ocr
Is tesseract 3.05 available for redhat 5?  Can we just rpm it or do we have to add a repository?


On Tuesday, June 27, 2017 at 2:07:59 PM UTC-6, zdenop wrote:
2.04 is too old.
Please ask install 3.05 + language data (at least eng and osd)

Zdenko

On Tue, Jun 27, 2017 at 9:58 PM, Steven Heydendahl <hey...@gmail.com> wrote:
Hi all,

Novice here.  I had made a request at my company to install tesseract-ocr on our redhat 5 OS.  

They ended up installing the following:
    rpm -Vp "tesseract-2.04-1.el5.rf.x86_64.rpm"

which is apparently an older version of tesseract.  Now, that completed successfully however, every time I try to run tesseract I get an error message.  Even when I just try to do the following:
    tesseract --version

the response is:
    tesseract:Error:Usage:tesseract imagename outputbase [-l lang] [configfile [[+|-]varfile]...]

and if I try to run tesseract on an image:
    tesseract OCRTest.png text l- eng
    read_variables_file:Can't open /usr/share/tesseract/tessdata/configs/engUnable to load unicharset file /usr/share/tesseract/tessdata/eng.unicharset


I do not know if this was a botched install, if we are missing dependencies, or if tesseract is just not compatible with redhat 5.  Any help is greatly appreciated!

Thanks,
Steve

--
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 tesseract-oc...@googlegroups.com.

akhil katpally

unread,
Jul 7, 2017, 11:52:04 AM7/7/17
to tesseract-ocr
Steven .. Here is the list of commands to install tesseract 3.05 on Redhat 6 ... Hope this should work for Redhat 5 ... if not please try to downgrade the tesseract and try .. 

sudo yum update 
           sudo yum install wget unzip
           sudo yum install gcc gcc-c++ make
           sudo yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel
           sudo yum install libtool 
           sudo yum install autoconf automake
     
     
          sudo yum whatprovides libtool
          (Install the latest version)
          sudo yum whatprovides libtiff
          sudo yum install libtiff-4.0.3-27.el7_3.x86_64

           Install autoconf-archive from: http://rpm.pbone.net/index.php3/stat/4/idpl/23652016/dir/centos_6/com/autoconf-archive-2012.04.07-7.3.noarch.rpm.html
          Download it manually and copy it into the ec2 instance. 
          sudo rpm -ivh autoconf-archive-2012.04.07-7.3.noarch.rpm
          
             
            
          Installing leptonica:
          tar xvf leptonica-1.74.1.tar.gz
          cd leptonica-1.74.1
          ./configure
           make
          sudo make install
          sudo ldconfig
          
          

          Installing Tesseract:
          cd ..
          unzip master.zip
           cd tesseract-master/
          sudo ./autogen.sh
          export LIBLEPT_HEADERSDIR=/usr/local/include
          export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
          export LD_LIBRARY_PATH=/usr/local/lib
          ./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/lib
          make
          sudo make install
          sudo ldconfig

          loading the training data for tesseract:
          Dowload the tessdata and copy only the contents into the tesseract-master/tessdata
          cd ..          
          sudo unzip master.zip
          Note: copy the contents into the tesseract-master/tessdata
          export TESSDATA_PREFIX=/usr/local/share/
          sudo mv ~/tesseract-master/tessdata/*  /usr/local/share/tessdata/

          test: tesseract --version
          

ShreeDevi Kumar

unread,
Jul 7, 2017, 12:36:37 PM7/7/17
to tesser...@googlegroups.com
​for 3.05 don't you need to checkout the 3.05 branch??​
master is for 4.0 development.

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

akhil katpally

unread,
Jul 17, 2017, 8:32:16 PM7/17/17
to tesseract-ocr
Thanks Shree for pointing out. master is for tesseract 4.0.
Reply all
Reply to author
Forward
0 new messages