2012-01-21 63 views
2

我正在編譯OCR 0.4,一個Google的光學識別程序。爲什麼在編譯程序時無法找到tesseract?

寫在他們需要的自述文件:

1) make sure you have these packages installed (current Ubuntu/Debian versions should work): libpng (with headers) libjpeg (with headers) libtiff (with headers)

2) install iulib from http://code.google.com/p/iulib

3) install a current version of tesseract from the Subversion repository (http://code.google.com/p/tesseract-ocr)

4) from the release directory, run ./configure make sudo make install

我所做的上方,然後他們所有的通道,當我輸入「的./configure」進入命令行我得到這個錯誤:

checking for /usr/include/tesseract/baseapi.h... no configure: error: Could not find tesseract! Choose --without-tesseract if you do not want to use it or specify the installation path with --with-tesseract=

我試過到目前爲止解決這個問題,是嘗試通過指定我通過鍵入"which tesseract"的正方體路徑,讓我

/usr/local/bin/tesseract 
編譯

因此我輸入了./configure --with-tesseract=/usr/local/bin/tesseract,並得到了相同的錯誤。

爲什麼我得到這個?

在此先感謝

編輯 - 後,我已經使用在回答下面我收到以下錯誤陳述的方法:

Localhost:ocropus giorgio$ make Making all in . g++ -DPACKAGE_NAME=\"ocropus\" -DPACKAGE_TARNAME=\"ocropus\" -DPACKAGE_VERSION=\"0.3\" -DPACKAGE_STRING=\"ocropus\ 0.3\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ocropus\" -DVERSION=\"0.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FLOAT_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBTIFF=1 -DHAVE_LIBIULIB=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBTESSERACT_FULL=1 -DHAVE_LIBLEPT=1 -DHAVE_LIBGSLCBLAS=1 -DHAVE_LIBGSL=1 -DHAVE_LIBBLAS=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DHAVE_DUP2=1 -DHAVE_MEMSET=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRRCHR=1 -I. -I./include -I./ocr-utils -I/usr/local/include -I/usr/local/include/tesseract -DHAVE_GSL -I/usr/local/include/tesseract -DHAVE_TESSERACT -I/usr/local/include/leptonica -DHAVE_LEPTONICA -g -O2 -Wall -Wno-sign-compare -Wno-write-strings -Wno-deprecated -g -O2 -MT glclass.o -MD -MP -MF .deps/glclass.Tpo -c -o glclass.o test -f './ocr-line/glclass.cc' || echo './' ./ocr-line/glclass.cc In file included from ./include/glinerec.h:57, from ./ocr-line/glclass.cc:5: ./include/glutils.h:139: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:105: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:129: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:175: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:236: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:421: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:644: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:1166: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:1403: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:1623: warning: ignoring #pragma omp parallel ./ocr-utils/components.h:275: warning: ‘struct ocropus::IComponentConstructor’ has virtual functions but non-virtual destructor /usr/local/include/colib/narray.h: In member function ‘colib::narray& colib::narray::truncate(int) [with T = char]’: ./ocr-utils/narray-binio.h:48: instantiated from here /usr/local/include/colib/narray.h:261: warning: no return statement in function returning non-void /usr/local/include/colib/narray.h: In member function ‘colib::narray& colib::narray::truncate(int) [with T = int]’: ./ocr-line/glclass.cc:295: instantiated from here /usr/local/include/colib/narray.h:261: warning: no return statement in function returning non-void /usr/local/include/colib/rowarrays.h: In function ‘T colib::rowdist_euclidean(colib::narray&, int, colib::narray&) [with T = float]’: ./ocr-line/glclass.cc:396:
instantiated from here /usr/local/include/colib/rowarrays.h:94: error: call of overloaded ‘sqrt(float)’ is ambiguous /usr/local/include/colib/iarith.h:345: note: candidates are: colib::interval colib::sqrt(colib::interval) /usr/local/include/colib/iarith.h:620: note:
colib::dinterval colib::sqrt(colib::dinterval) ./ocr-utils/components.h: At global scope: ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::MappedClassifier]’ ./ocr-line/glclass.cc:1795:
instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::Float8Buffer]’ ./ocr-line/glclass.cc:1796: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::KnnClassifier]’ ./ocr-line/glclass.cc:1798: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::BitNN]’ ./ocr-line/glclass.cc:1799: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::AutoMlpClassifier]’ ./ocr-line/glclass.cc:1801:
instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew2’: ./ocr-utils/components.h:310:
instantiated from ‘void ocropus::component_register2(const char*, bool) [with T = glinerec::MappedClassifier, S = glinerec::AutoMlpClassifier]’ ./ocr-line/glclass.cc:1802:
instantiated from here ./ocr-utils/components.h:286: warning: ‘struct ocropus::ComponentConstructorNew2’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::AdaBoost]’ ./ocr-line/glclass.cc:1804: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew2’: ./ocr-utils/components.h:310: instantiated from ‘void ocropus::component_register2(const char*, bool) [with T = glinerec::MappedClassifier, S = glinerec::AdaBoost]’ ./ocr-line/glclass.cc:1805: instantiated from here ./ocr-utils/components.h:286: warning: ‘struct ocropus::ComponentConstructorNew2’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::CascadedMLP]’ ./ocr-line/glclass.cc:1807: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew2’: ./ocr-utils/components.h:310: instantiated from ‘void ocropus::component_register2(const char*, bool) [with T = glinerec::MappedClassifier, S = glinerec::CascadedMLP]’ ./ocr-line/glclass.cc:1808: instantiated from here ./ocr-utils/components.h:286: warning: ‘struct ocropus::ComponentConstructorNew2’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::LatinClassifier]’ ./ocr-line/glclass.cc:1810: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor make[1]: * [glclass.o] Error 1 make: * [all-recursive] Error 1

回答

2

每對OCRopus的文檔,你可以嘗試:

./configure --with-tesseract=/usr/local 
+0

謝謝!你的回答使我避免了這個錯誤,但是現在當我使用它時,make [1]:*** [glclass.o]錯誤1 make:*** [all-recursive]錯誤1 – KingBOB

+0

我沒有看到你錯誤;你能編輯你的問題並將其粘貼到你當前的文本下面嗎? – Douglas

+0

我在文本下面粘貼了整個錯誤。 – KingBOB

相關問題