Tess4j unsatisfied link error on mac OS X

后端 未结 5 531
野趣味
野趣味 2020-12-10 18:24

Hey i am trying to use tess4j for tesseract and having this issue for eclipse on mac osx .

My tesseract is working fine from terminal but trying to run tess4j throug

5条回答
  •  执念已碎
    2020-12-10 18:51

    This is exactly what I was after today, so thanks for the Q&A above. As one additional step beyond what maresa mentioned, I ran into this error after fixing the one you asked about:

    java.lang.UnsatisfiedLinkError: dlopen(/var/folders/sq/rh89_ntd7jqdlv9__25zj9dr0000gp/T/jna--913086793/jna8800789057827590119.tmp, 9): Library not loaded: /usr/local/lib/libjpeg.8.dylib
      Referenced from: /usr/local/lib/liblept.4.dylib
      Reason: image not found
    

    So to fix this I needed to set up a symlink for libjpeg.8.dylib:

    ln -s /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/lib/libjpeg.8.dylib
    

    Not sure if there is a way to do this without the symlink (i.e. package it in the jar), but I hope this helps anyone else who is looking at this post.

提交回复
热议问题