RoR-Tesseract-Heroku
RoR-Tesseract-Heroku copied to clipboard
File Missing
Hey hoping you can help me. Trying to use your code to build an ocr thing for my site. I have this located up on heroku using the multipack and what not. But when I try to POST an image, the executable returns tesseract: error while loading shared libraries: libtiff.so.4: cannot open shared object file: No such file or directory
. Any idea how to fix this? Thanks so much!
Hey! Thanks for sharing this. I'm having the same problem posting an image after having deployed the server to Heroku. Fouady do you have an idea how to fix this?
Hey. Apparently the link to tesseract binaries in Heroku Buildpack Tesseract wasn't accessible. I have updated the link. Hope this will fix the problem. I haven't tested it but let me know if it doesn't work.
I'll test it out today. Thanks so much for writing this code and responding. If it's good to go, I'll close this out.
Nope, still getting tesseract: error while loading shared libraries: libtiff.so.4: cannot open shared object file: No such file or directory
.
I vimed into vendor and see the tesseract-ocr folder. Inside it are bin
, lib
, & tessdata
. bin
has the tesseract
executible. lib
has liblept.so.3
& libtesseract.so.3. And
tessdata` has...
dan-frak.traineddata fra.traineddata
deu-frak.traineddata nld.traineddata
deu.traineddata nor.traineddata
eng.cube.bigrams rus.cube.fold
eng.cube.fold rus.cube.lm
eng.cube.lm rus.cube.nn
eng.cube.nn rus.cube.params
eng.cube.params rus.cube.size
eng.cube.size rus.cube.word-freq
eng.cube.word-freq rus.traineddata
eng.tesseract_cube.nn slk-frak.traineddata
eng.traineddata spa.cube.bigrams
fin.traineddata spa.cube.fold
fra.cube.bigrams spa.cube.lm
fra.cube.fold spa.cube.nn
fra.cube.lm spa.cube.params
fra.cube.nn spa.cube.size
fra.cube.params spa.cube.word-freq
fra.cube.size spa_old.traineddata
fra.cube.word-freq spa.traineddata
fra.tesseract_cube.nn swe.traineddata
I'm guessing the libtiff.so.4
should be in lib, but doesn't look like it's there.
Also I tried using a brand new heroku app with brand new code, and still no go..
Were you able to solve the problem?
No I wasn't unfortunately. I was able to get a different repo's code to work though.
I'm also getting the error with this buildpack https://github.com/fouady/heroku-buildpack-tesseract:
tesseract: error while loading shared libraries: libtiff.so.4: cannot open shared object file: No such file or directory
libtiff.so.4
appears to be missing from the cedar-14 heroku stack and replaced by libtiff.so.5
.
Is it possible for the buildpack to include the libtiff.so.4
version of the library?
Related issues
- https://github.com/alex88/heroku-buildpack-vips/issues/9
I was able to get the buildpack to work by using an additional buildpack for apt. https://github.com/ddollar/heroku-buildpack-apt
I then needed to use it to install libtiff4
and libjpeg62
. For an example, check my .buildpacks
and Aptfile
at https://github.com/BrandonClapp/quollect
I forked https://github.com/fouady/Heroku-Buildpack-Tesseract to correct the issue without using additional buildpacks. You can find my fork at https://github.com/matteotiziano/heroku-buildpack-tesseract.
First, I compiled the missing libraries libtiff4
and libjpeg62
in a bash shell of a Heroku Dyno heroku run bash
, then I downloaded the compiled files using scp
, and finally I merged them with the Tesseract package provided by @fouady at http://www.weebly.com/uploads/1/1/5/1/11516991/tesseract-ocr-3.02.02.tar.gz; for convenience, I included the updated tarball in my buildpack.
I followed the idea of @BrandonClapp and works for me. Thanks @BrandonClapp :heart:
Followed using @matteotiziano buildpack and it works mostly. It seems libgif is not included? 'tesseract: error while loading shared libraries: libgif.so.4: cannot open shared object file: No such file or directory'
Trying to figure out how to fix this..
@ksfire Any luck?, I am also stuck on this problem.
@Buyachaka no, was not able to solve it
@ksfire Probably something has changed in Heroku and libgif is no longer included / available. Have you tried following the same approach I have described in my previous message (i.e., compiling the missing library in a Heroku bash session and then include it in the Tesseract package)?
tesseract: error while loading shared libraries: libpng12.so.0: cannot open shared object file
got this new error i think its similar to what u ppl r trying to solve... it will be great if u people help me out
I get this error pytesseract.pytesseract.TesseractError: (127, 'tesseract: error while loading shared libraries: libarchive.so.13: cannot open shared object file: No such file or directory
.
You can try mine if you don't have a solution yet, I just built this and have tested in production - I only have english language support at the present: https://github.com/xaptronic/heroku-buildpack-tesseract