gosseract: 'tesseract/baseapi.h' file not found
% go test ./...
# github.com/otiai10/gosseract/tesseract
tesseract/tess.cpp:1:10: fatal error: 'tesseract/baseapi.h' file not found
FAIL github.com/otiai10/gosseract [build failed]
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 25 (9 by maintainers)
Need to install
libleptonica-dev
andlibtesseract-dev
.For anybody else experiencing this issue on an M1 mac:
Actually, I think I have a solution. This problem can occur when the command-line developer tools for Xcode are not installed, or when you upgrade Xcode.
To fix, do the following:
This worked for me.
I try to install gosseract on FreeBSD 11.0. I have tesseract and leptonica installed. My
baseapi.h
is at/usr/local/include/tesseract/baseapi.h
but I still get:Is there any way to tell where to find the file manually?
EDIT: I hacked my way through the C imports changing:
tesseract/wrapper.go
and
tesseract/tess.cpp
This way I got it working
on osx, this is solved using homebrew: brew install tesseract
This works charm 🚀
+1
brew remove tesseract brew remove leptonica xcode-select --install brew install tesseract go get github.com/otiai10/gosseract
worked like a charm.
same here I have xcode-select installed already
windows get the same error? I put here. please help.
I experienced same issue here. This error keep showing up even tesseract already installed. Am I missing something? I use yosemite