这是
./configure
的结果:
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
也不起作用。
我遇到了同样的错误。以下是对我有用的。
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
如果配置失败并出现此类错误,请仔细检查您是否已安装 autoconf-archive 并重新启动 Tesseract 安装过程(./autogen.sh,./configure` ...)
并确保您已安装最新版本的laptonica,在我的例子中是Laptonica-1.74,因为安装过程需要它。