I installed tesseract 4.00.00alpha and leptonica in ubuntu 16.04 x86. When i am using the following command,
tesseract -v
The output is
tesseract 4.00.00alpha
leptonica-1.74
libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8
Found AVX
Found SSE
Which is desired.
But while i am trying to compile my following code,
#include<baseapi.h>
#include<allheaders.h>
int main(){
tesseract::TessBaseAPI *first=new tesseract::TessBaseAPI();
printf("Tesseract version %s\n",first->Version());
printf("leptonica version %s\n",getLeptonicaVersion());
return 0;
}
with the command,
g++ sample.cpp -o sample.out -I/usr/local/include/leptonica -I/usr/local/include/tesseract -llept -ltesseract
The output is,
Tesseract version 3.04.01
leptonica version leptonica-1.74
Why the previous tesseract version is being shown? Is there any problem with the library files of tesseract and leptonica? Thank you!
The problem was while installing leptonica 1.74, i used a command,
sudo apt-get install libleptonica-dev
and while building tesseract 4.00.00 from source, i used a command,
sudo apt-get install libtesseract-dev
These above two commands are creating the problem. Actually we dont need install libleptionica-dev and libtesseract-dev since you are building tesseract from source.
I uninstalled both packages and reran my code.
sudo apt-get remove libleptonica-dev libletesseract-dev
It then worked successfully.
Related
Downloaded a prebuilt cross compiler sparc-elf-4.2.2 and has set the PATH to sparc-elf-4.4.4/bin after which i ran sparc-elf-gcc -o matrixmul matrixmul.c on the terminal only to find the following response
/home/root/sparc-elf-4.4.2/bin/sparc-elf-gcc: No such file or directory
I have no idea as to why this response .
I just ran into the same problem. Turned out that that my OS is a 64-Bit Ubuntu System and the compiler is a 32-Bit program.
I followed the instructions given here https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit :
To run a 32-bit executable file on a 64-bit multi-architecture Ubuntu
system, you have to add the i386 architecture and install the three
library packages libc6:i386, libncurses5:i386, and libstdc++6:i386:
sudo dpkg --add-architecture i386
Or if you are using Ubuntu 12.04 LTS (Precise Pangolin) or below, use this:
echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch
Then:
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
If fails, do also
sudo apt-get install multiarch-support
After these steps, you should be able to run the 32-bit application:
./example32bitprogram
We had initially installed tesseract 3.04 in centos 7, and know switching to tesseract 3.05. We have un-installed the older versions and have already installed leptonica-1.75.3 downloaded from leptonica home site.
But, when we go for installing tesseract 3.05, we get following error
checking for LEPTONICA... no
configure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
when running ./configure in console in tesseract-3.05.01 folder.
Need to know, where the issue is.
The configure script uses pkg-config to see if the leptonica libs are installed (and have the required version).
After you have compiled and installed leptonica from source code you have to manually tell pkg-config where to find the lept.pc config file which is installed with leptonica. Set the PKG_CONFIG_PATH environment variable so it points to the location of lept.pc. If you installed leptonica to its default location you should do:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
before running configure for tesseract.
Mine would not work until I did the following copy commands. My Leptonica was installed in the leptonica-1.83.0 directory, yours may be different.
cp /usr/local/leptonica-1.83.0/lib/pkgconfig/lept.pc /usr/lib64/pkgconfig/
cp -a /usr/local/leptonica-1.83.0/lib/liblept /usr/lib64
Also set:
export PKG_CONFIG_PATH=/usr/local/leptonica-1.83.0/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/leptonica-1.83.0/lib
export LIBLEPT_HEADERSDIR=/usr/local/leptonica-1.83.0/include/leptonica
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/leptonica-1.83.0/lib/pkgconfig
export PKG_CONFIG_PATH=/usr/local/leptonica-1.83.0/lib/pkgconfig/
Then it worked.
I just installed tesseract locally on my mac and installed Leptonia . Xaamp use as utility server .
I have the following problem , when you launch the command tesseract from terminal all is successful, however, if the launch tesseract command from php script gives me this error :
dyld: Library not loaded: /usr/local/lib/libtiff.5.dylib
Referenced from: /usr/local/opt/leptonica/lib/liblept.4.dylib
Reason: Incompatible library version: liblept.4.dylib requires version 8.0.0 or later, but libtiff.5.dylib provides version 6.0.0
can someone help me? thank you
I have a problem similar, but not the same. You can try this:
brew install tesseract
If you Could not symlink, /usr/local/bin is not writable, use this command:
sudo chown -R $(whoami) /usr/local
After that install the autoconf, automake, and libtool with this command:
brew install autoconf automake libtool
I think you will need use this one as well: brew install leptonica --with-libtiff
Finally use the link command to link all libs: brew link tesseract, brew link automake, brew link libtool, etc...
I hope it helps you.
I did this and it helped me with a similar problem.
https://sourceforge.net/p/vietocr/discussion/833570/thread/e1eec2b14b/#e296
I went to /usr/local/opt/tesseract/lib/. I had libtesseract.5.dylib and created a symlink with following command: sudo ln -s libtesseract.5.dylib libtesseract.4.dylib
I am getting a decoder jpeg not available. I libjpeg installed using brew but when I install pillow, is get *** JPEG support not available
I had this working and all of a sudden it stopped working. I have unlinked and linked libjpeg again like it was suggested in few other SO answers. I have also uninstalled pillow and libjpeg and then installed it again, no joy.
Have you installed libjpeg-dev?
sudo apt-get install libjpeg-dev
Edit: realized you're probably on OSX. Have you tried the following step from the accepted answer from this question?
Before installing PIL but after installing libjpeg, change the “JPEG_ROOT = None” line in my setup.py file to “JPEG_ROOT = libinclude(“/usr/local”)” (or wherever libjpeg is installed)
Have you tried the most common solution to this problem?
$ pip uninstall pillow`
$ brew install libjpeg`
$ pip install pillow`
I installed libjpeg form http://ethan.tira-thompson.com/Mac_OS_X_Ports.html and it works now. Probably brew didn't create symlinks where its being expected.
I am compiling MongoDB from source with instructions from http://www.mongodb.org/display/DOCS/Building+for+Linux
I ran into this error after ran "scons all":
rty/js-1.7/jsscan.c
third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or directory
third_party/js-1.7/jsscan.c: In function 'FindKeyword':
third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined but not used
third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined but not used
scons: *** [third_party/js-1.7/jsscan.o] Error 1
scons: building terminated because of errors
I am on a 64 bit ubuntu 10.04. gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), scons version is:
script: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
engine: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
Does anyone have the same problem? There are similar errors reported for this jsscan file in earlier versions, but has been fixed since.
Dude it worked! Do this:
sudo apt-get remove xulrunner-1.9.2-dev xulrunner-1.9.2
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export
Then run scons all again
There is no need to uninstall "xulrunner-1.9.2-dev" and "xulrunner-1.9.2" as it's also uninstalls other packages you may need later.
Just install the newer version of scons package (I used for it scons-2.1.0).
Download scons-2.1.0.tar.gz
Install it and use the installed one instead of the scons v1.2.0 repository package for Ubuntu 10.04.
It worked for me without any additional tricks.