这里是 Homebrew的 Error:
环境:
Homebrew 2.0.1
这里贴出HomeBrew - core github地址: https://github.com/Homebrew/homebrew-core
这里指明安装工具为 tesseract
一、brew info tesseract -- 查看远程HomeBrew里的 tesseract.rb信息
发现只有一个选项 所以网上说的什么 --with-all-languages --with-trainingtools 等选项取消了 (在大约两星期前)
原因: HomeBrew正在着手删除所有options,因为options没有给到良好的用户体验,使用户不得不从源码构建
地址: https://github.com/Homebrew/homebrew-core/issues/31510
二、于是想办法安装还没去掉该options时的版本
[转]安装brew指定版本 : https://www.jianshu.com/p/aadb54eac0a8
找到可以用的 并有--training-tools 选项的rdb文件: https://gist.githubusercontent.com/varenc/6a532958272de35424c396859f9b9c93/raw/9131921175db88866265b115f025bc4464ca303d/tesseract.rb
命令行执行:
brew install --with-training-tools https://gist.githubusercontent.com/varenc/6a532958272de35424c396859f9b9c93/raw/9131921175db88866265b115f025bc4464ca303d/tesseract.rb
眼看就要成功了! Too Young too Simple!
其中某版本还遇到了: Error: Calling needs :cxx11 is disabled!
其实HomeBrew不支持安装旧版本(但有的人还是安装旧版本成功了):
这里贴出解释 cxx11错误的地址: https://discourse.brew.sh/t/error-calling-needs-cxx11-is-disabled-there-is-no-replacement/4073
后面接着讲 Tesseract,不安装这个的可以绕过了
Tesseract 从22MB到682MB 因为它已经包含了所有语言 即很多博客里的写的 --with-all-lanuages 选项,那 --with-training-tools呢?? Excuse me? 直接brew install Tesseract (680MB),但是 unicharset_extractor 等 command 仍是not found
有关Tesseract选项的讨论区 : https://github.com/Homebrew/homebrew-core/pull/36786
解决办法 :
自己编译运行 : https://github.com/tesseract-ocr/tesseract/wiki/Compiling#macos