-
Notifications
You must be signed in to change notification settings - Fork 74
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
Could not open library #32
Comments
I'm using rbenv 0.4.0-89-g14bc162 with ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux] on a CentOS release 6.4 |
I have run sudo ldconfig after installing tesseract but I get the same error |
Is the file actually present? Is the |
After a lot of work I could run the web app, but now I possibly discovered a bug. index >= 0 && index < size_used_:Error:Assert failed:in file ../ccutil/genericvector.h, line 512 All the trace here https://gist.github.com/movihus/226e7a4f49ff4fc6ad0e#file-gistfile1-txt |
What's the code that caused it? |
I tried with this code: path = 'image.jpg'
engine = Tesseract::Engine.new()
result = engine.text_for(path) |
Could you post the image as well please? |
I pushed a new gem version since it works for me on master, can you try with this new version please? |
I installed and now I have compilation errors: g++ -shared -fPIC -o /tmp/.ffi-inline-500/f6b0bffaa19644042f282b7bf04377398eed387c.so /tmp/.ffi-inline-500/f6b0bffaa19644042f282b7bf04377398eed387c.cpp -ltesseract 2>>/tmp/.ffi-inline-500/f6b0bffaa19644042f282b7bf04377398eed387c.log I found this thread #7, but it supposses I installed the tesseract-devel package, yum list | grep tesseract* yum list | grep leptonica* |
I think I missed the issue, #3 is the correct |
I found the headers in /home/makerpm/rpmbuild/BUILD/tesseract-ocr/ccutil/, copy it to /home/deployer/rpmbuild/BUILD/tesseract-ocr/ccutil/ (to have the correct permissions), modified my ~/.bashrc adding: export CFLAGS=-I/home/deployer/rpmbuild/BUILD/tesseract-ocr/ccutil/ And the libs copied to /home/deployer/rpmbuild/BUILD/tesseract-ocr/api/.libs and then added to .bashrc export LDFLAGS=-L/home/deployer/rpmbuild/BUILD/tesseract-ocr/api/.libs But when I try to access the console througth rails console I get the same error. What I'm doing wrong?. |
I don't know, I don't use the system you use. |
For me compiling and installing the latest Leptonica http://leptonica.org/download.html fixed this. The apt-get repository version won't suffice. |
Solution for Redhat installation of leptonica and tesseract with the correct arguments to make it run inspired from this .sh install file which did not work completely for me yum -y update
yum -y install libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
#Install AutoConf-Archive
wget ftp://mirror.switch.ch/pool/4/mirror/epel/7/ppc64/a/autoconf-archive-2016.09.16-1.el7.noarch.rpm
rpm -i autoconf-archive-2016.09.16-1.el7.noarch.rpm
# install leptonica from github
wget https://github.com/DanBloomberg/leptonica/archive/v1.72.tar.gz
tar -zxvf v1.72.tar.gz
cd leptonica-1.72
chmod +x configure # this is only if you have permission problems.
./configure --prefix=$HOME/local/
make
make install
cd ..
# install tesseract from github
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.01.tar.gz
tar -zxvf 3.04.01.tar.gz
cd tesseract-3.04.01/
./autogen.sh
LIBLEPT_HEADERSDIR=$HOME/local/include ./configure --prefix=$HOME/local/ --with-extra-libraries=$HOME/local/lib
make
make install
This will solve this issue and issue #3 I might be important to add |
I'm trying to deploy an application that uses tesseract-ocr with passenger and when I open the website I see this error:
Could not open library '/tmp/.ffi-inline-500/985899750dd2ded7660e51be030ff964c9d21dc8.so': libtesseract.so.3: cannot open shared object file: No such file or directory (LoadError)
I have installed:
tesseract 3.02.02
leptonica-1.70
libjpeg 6b : libpng 1.2.49 : libtiff 3.9.4 : zlib 1.2.3
What could I do?.
Thanks in advance.
The text was updated successfully, but these errors were encountered: