Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install on linux? #3

Open
terry-fei opened this issue Sep 9, 2017 · 4 comments
Open

install on linux? #3

terry-fei opened this issue Sep 9, 2017 · 4 comments

Comments

@terry-fei
Copy link

can this module install on ubuntu?

@kaelzhang
Copy link
Owner

kaelzhang commented Sep 9, 2017

No, for now, but I will working on that.

On Ubuntu, the version of tesseract binary of apt-get source is 3.04, which is out-dated.

And version 3.04 will cause a problem that pkg-config could not find the location of headers files of tesseract, see tesseract-ocr/tesseract#241 .

And the only possible way is to manually install tesseract from source code.

@terry-fei
Copy link
Author

provide a Docker image may be a good choice

@dortonway
Copy link

dortonway commented Dec 22, 2017

Which tesseract version does penteract expect? I've tied 4.00.00alpha, but got:

make: Entering directory '/databank/mega/development/js/img_recognition/node_modules/penteract/build'
  CXX(target) Release/obj.target/penteract/cc/penteract.o
  CXX(target) Release/obj.target/penteract/cc/ocr.o
In file included from /usr/local/include/tesseract/ltrresultiterator.h:26:0,
                 from /usr/local/include/tesseract/resultiterator.h:26,
                 from /usr/local/include/tesseract/baseapi.h:31,
                 from ../cc/ocr.h:4,
                 from ../cc/ocr.cc:1:
/usr/local/include/tesseract/unichar.h:164:10: error: ‘stringdoes not name a type
   static string UTF32ToUTF8(const std::vector<char32>& str32);
          ^
penteract.target.mk:100: recipe for target 'Release/obj.target/penteract/cc/ocr.o' failed
make: *** [Release/obj.target/penteract/cc/ocr.o] Error 1
make: Leaving directory '/databank/mega/development/js/img_recognition/node_modules/penteract/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/i/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-101-generic
gyp ERR! command "/home/i/.nvm/versions/node/v8.6.0/bin/node" "/home/i/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /databank/mega/development/js/img_recognition/node_modules/penteract
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN img_recognition@1.0.0 No description
npm WARN img_recognition@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! penteract@0.4.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the penteract@0.4.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/i/.npm/_logs/2017-12-22T23_11_46_972Z-debug.log

02:11 i img_recognition

To fix that I added "std::" to "string" on /usr/local/include/tesseract/unichar.h:164.

@Piterden
Copy link

$ sudo apt install tesseract-ocr tesseract-ocr-eng libtesseract-dev libleptonica-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants