【问题标题】:i want to install Tesseract and ./configure我想安装 Tesseract 和 ./configure
【发布时间】:2017-03-30 23:51:03
【问题描述】:

这是 ./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 也不起作用

【问题讨论】:

  • 你错过了./configure失败的部分吗?当然,在那之后make会失败。
  • 我看到了,我知道 make 行不通,这正是我在这里的原因 :) 说真的,你不得不来投反对票……天哪,这里的社区真的很评判.. 还有两个像你和我这样的人将在接下来的四天内被禁止发帖,而我有一个概念证明要在这个星期一交付 -_-

标签: makefile tesseract


【解决方案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

【讨论】:

    【解决方案2】:

    如果配置失败并出现此类错误,请仔细检查您是否已安装 autoconf-archive 并重新启动 Tesseract 安装过程 (./autogen.sh,./configure` ...)

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

    Reference to tesseract-ocr compiling

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-04
      • 2013-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      相关资源
      最近更新 更多