-
Notifications
You must be signed in to change notification settings - Fork 373
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
liblept.so.4: cannot open shared object file #28
Comments
Hi there! Which version of tess4j and centos are you using?
|
tess4j src from master branch |
Hi, I am having the same issue. Using Tess4j-2.0.1.jar which comes with Tesseract 3.03 and Leptonica 1.7. It works fine on Tomcat under Windows but Linux won't work.
Always the same error: |
Had the same problem, solved it for me by loading liblept.so in the static-block in LoadLibs. So leptonica.so is loaded before tesseract is loaded by calling getTessAPIInstance. |
Very smart approach. I will try it. Did you use the static function? |
Yes, I packed liblept.so.4 with tess4j, extracted it to the tempdir like tess4j does with tesseract and called |
People, mhinters rules! Thanks. It worked. Please note:
The only thing was to give the real full path of "liblept.so.4" to the static function and calling it before Tesseract does, like this: System.load("/opt/tomcat7/project/liblept.so.4") ; mhinters, thanks again. PS: Make sure the file has the right permissions |
You can also create a symlink. |
Hello!
Unfortunately I am not able to run tesseract through tess4j on Linux (CentOS).
I think that tesseract is being loaded correctly with JNA, but for some reason he can't find liblept.so.
Is it possible to somehow tell tesseract which is loaded through JNA where he should look for liblept.so?
Or maybe it would be possible to compile tesseract in such way that leptonica shared library wouldn't be needed at execution time?
NOTE1: I can't set LD_LIBRARY_PATH environment variable. It solves the problem but cannot be done on my system.
NOTE2: Leptonica is not installed on local machine.
NOTE3: I have compiled Tesseract from the source (tried github master branch and 3.02 from sourceforge).
The text was updated successfully, but these errors were encountered: