我想安装Tesseract和./configure

时间:2017-03-30 23:51:03

标签: makefile tesseract

这是./configue:

的结果
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
Using git revision: 4.00.00alpha-358-g362b68e
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
./configure: line 4250: syntax error near unexpected token `-mavx,'
./configure: line 4250: `AX_CHECK_COMPILE_FLAG(-mavx, avx=true, avx=false)'

这是运行make后得到的错误:

make:***未指定目标且未找到makefile。停止。 所以sudo make install也不起作用

2 个答案:

答案 0 :(得分:1)

我得到了同样的错误。以下是对我有用的。

cd tesseract-3.05.00

./autogen.sh

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 

LIBLEPT_HEADERSDIR=/usr/local/include ./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/lib

LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make

make install

ldconfig

请参阅下面的完整脚本链接,其中包括正确安装Leptonica和依赖项。 https://github.com/EisenVault/install-tesseract-redhat-centos/blob/master/install-tesseract.sh

答案 1 :(得分:1)

如果configure因这些错误而失败,请仔细检查您是否已安装autoconf-archive并重新启动Tesseract安装过程(./autogen.sh,./ configure` ...)

并确保您已安装最新版本的laptonica,在我的情况下为Laptonica-1.74,因为它是安装过程所必需的。

Reference to tesseract-ocr compiling