티스토리 뷰

tesseract-ocrconfigure 하다보면 아래와 같은 오류가 출력되는 경우가 있다.


configure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.


무려 Ubuntu 16.04 인데 말이다!! 우선 이미지 프로세싱에서 사용되는 leptonica 버전을 1.74 혹은 그 이상으로 올려야 한다는 의미인데, tesseract-ocr wiki 에서 아래와 같이 관련된 내용을 찾아 볼 수 있다.



but if you are using an oldish version of Linux, the Leptonica version may be too old, so you will need to build from source.

Tesseract versions and the minimum version of Leptonica required:

TesseractLeptonicaUbuntu
4.001.74.0Must build from source
3.041.71Ubuntu 16.04
3.031.70Ubuntu 14.04
3.021.69Ubuntu 12.04
3.011.67


내용을 확인 했으면 얌전히 leptonica를 다운로드 받아 컴파일 해야 한다. 다운로드는 아래 링크에서 받도록 한다.
http://www.leptonica.org/download.html


적절하게 1.74 이상의 버전을 다운로드 받았으면 컴파일을 진행해야 하는데 아래와 같은 과정으로 하면 되겠다.

$ ./configure; make; sudo make install


install시에 sudo 권한이 필요할 수 있으며 혹시 컴파일에 이상이 있는 듯 하면 make check를 실행하고 에러를 확인해 보면 된다. 이렇게 leptonica 설치가 끝났으면 다시 tesseract-ocrconfigure를 진행해보자. 정상적으로 에러 없이 동작하는 것을 확인할 수 있다.

oops@oops:tesseract$ ./configure --enable-debug
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
...중략
config.status: executing libtool commands

Configuration is done.
You can now build and install tesseract by running:

$ make
$ sudo make install

You can not build training tools because of missing dependency.
Check configure output for details.

oops@oops:tesseract$ 

'개발 > Linux' 카테고리의 다른 글

message queue 최대 길이  (0) 2017.04.25
(ubuntu) tesseract-ocr을 사용해보자  (18) 2017.04.18
(CentOS) chkconfig 이해하기  (2) 2017.04.18
(CentOS) 데몬의 coredump 얻기  (0) 2017.04.17
VIM 주석을 달아보자 (Doxygen)  (0) 2017.04.11
댓글
최근에 올라온 글
최근에 달린 댓글
글 보관함
Total
Today
Yesterday