WebFaction
Community site: login faq

tesseract in not in the centos6 default packages list, my webapp is based on parsing image files retrieving text data, so in order to switch to webfaction hosting I need to know if I can install tesseract as a custom package. btw Tesseract requires leptonica, so I shoud be able to install it too.

Is it possibile?

thx

asked 07 Apr '13, 10:00

Opere Aperte
111
accept rate: 0%


Sure! You should be able to run both software on our servers, by compiling their source code.

See our guide on how to install software from source, as well as Leptonica's and tesseract documentation.

permanent link

answered 07 Apr '13, 10:28

iliasr ♦♦
2.1k14
accept rate: 35%

great! and thx for the fast answer!

(07 Apr '13, 11:42) Opere Aperte

this script should compile and install leptonica+opencv+tesseract with CentOS 6. It requires sudo to make install it. How can I manage to install lept+tess without root access?

yum groupinstall "Development Tools" -y
yum install axel wget cmake -y 
yum -y install libjpeg-devel libpng-devel libtiff-devel zlib-devel
yum -y install gcc gcc-c++ make
wget http://www.leptonica.com/source/leptonica-1.69.tar.gz
tar zxvf leptonica-1.69.tar.gz
cd leptonica-1.69
./configure --prefix=/usr --libdir=lib64
make
sudo make install

cd ..
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.2/OpenCV-2.4.2.tar.bz2
tar jxvf OpenCV-2.4.2.tar.bz2
wget http://python-tesseract.googlecode.com/files/opencv-2.4.0-fix-pkgconfig.patch
patch -p1 < opencv-2.4.0-fix-pkgconfig.patch
mkdir release
cd release
sed -i.bak 's|libdir=|libdir=/usr/lib64|g' unix-install/opencv.pc
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr  -D CMAKE_LIBRARY_PATH=/usr/lib64 -D BUILD_PYTHON_SUPPORT=ON ..
make
make install

cd ..
svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr

cd tesseract-ocr/
./autogen.sh
./configure --prefix=/usr --with-libdir=lib64
make
make install

cd /usr/lib
cp -Rf *opencv* /usr/lib64
cp -Rf *tess* /usr/lib64
cp -Rf *lept* /usr/lib64

Thx

permanent link

answered 15 Apr '13, 17:54

Opere Aperte
111
accept rate: 0%

The aforementioned guide on how to install software from source contains generic instructions for installing software in your home directory without root access.

(15 Apr '13, 18:02) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×102
×11
×2
×1

question asked: 07 Apr '13, 10:00

question was seen: 5,606 times

last updated: 15 Apr '13, 18:02

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM