温斯顿吴的个人博客 woojean.com

Mac搭建支持简体中文图片识别的开发环境

2024-07-26

修改homebrew、homebrew-core、homebrew-cask地址:

echo $(brew --repo)
echo $(brew --repo homebrew/core)
echo $(brew --repo homebrew/cask)

git -C "$(brew --repo)" remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-cask.git

更新homebrew

brew update

安装tesseract

brew install tesseract

安装简体中文库chi_sim.traineddata

下载页面:https://digi.bib.uni-mannheim.de/tesseract/tessdata_fast/

放到安装路径:

问题1:xz: undefined method `deny_network_access!’

Error: xz: undefined method `deny_network_access!' for Formulary::FormulaNamespace4b3a9a46cdd92f6d4f21491620738535::Xz:Class

解决:

brew upgrade xz
brew cleanup xz --prune=0

下一篇 《解深密经》

文章目录