WebFaction
Community site: login faq

I installed Leptonica and then I tried to install Tesseract. Everything went fine until the last step make install

make[1]: Entering directory `/home/michalp/tesseract-ocr/ccutil'
make[2]: Entering directory `/home/michalp/tesseract-ocr/ccutil'
make[3]: Entering directory `/home/michalp/tesseract-ocr/ccutil'
/bin/mkdir -p '/usr/local/include/tesseract'
/bin/mkdir: directory „/usr/local/include/tesseract“ can not be created: Operation failed

note: the error message was translated into English, but the meaning is OK. It's clear to me that it's caused by not having su permissions. What is the easiest way to change the directory used?

asked 28 Sep '15, 23:13

michal
2719
accept rate: 0%

edited 28 Sep '15, 23:16


Okay, looking at the source documentation I was able to install both (for English) in this way:

Install Leptonica

mkdir -p $HOME/tmp export TEMPDIR=$HOME/tmp mkdir -p $HOME/src cd src wget http://www.leptonica.com/source/leptonica-1.72.tar.gz tar xzf leptonica-1.72.tar.gz cd leptonica-1.72 ./configure --prefix=$HOME make make install

Install tesseract-ocr

cd $HOME/src wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz tar xzf tesseract-ocr-3.02.02.tar.gz wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz tar xzf tesseract-ocr-3.02.eng.tar.gz cd tesseract-ocr ./autogen.sh LIBLEPT_HEADERSDIR=$HOME/include/leptonica LDFLAGS="-L$HOME/lib" ./configure --prefix=$HOME make make install

If you encounter any complicated issues, please open a support ticket. Hope this helps!

permanent link

answered 29 Sep '15, 02:42

NickR ♦♦
4415
accept rate: 19%

Thank you very much it worked, just one extra thing that might be needed because of the language packages:

export TESSDATA_PREFIX='/home/username/share'
(29 Sep '15, 09:30) michal

I needed to use Tesseract lately and because of the server migration I had to reinstall it. The project has moved to Github, I installed version 3.04, I didn't find new language packs, however it works as expected, so it seems to be all right.

mkdir -p $HOME/tmp
export TEMPDIR=$HOME/tmp
mkdir -p $HOME/src
cd src
wget http://www.leptonica.com/source/leptonica-1.73.tar.gz
tar xzf leptonica-1.73.tar.gz
cd leptonica-1.73
./configure --prefix=$HOME
make
make install

cd $HOME/src
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.00.tar.gz
tar xzf 3.04.00.tar.gz
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
tar xzf tesseract-ocr-3.02.eng.tar.gz
cd tesseract-3.04.00
./autogen.sh
LIBLEPT_HEADERSDIR=$HOME/include/leptonica LDFLAGS="-L$HOME/lib" ./configure --prefix=$HOME
make 
make install
permanent link

answered 05 Feb '16, 17:48

michal
2719
accept rate: 0%

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
×44
×11
×2
×1

question asked: 28 Sep '15, 23:13

question was seen: 2,830 times

last updated: 05 Feb '16, 17:48

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