title: Unable to load library 'tesseract': libtesseract.so: cannot open shared object file: No such file or directory
body: <p>I've had tesseract and <a href="http://tess4j.sourceforge.net/usage.html" rel="noreferrer">Tess4J</a> running on my MBP for a while now. Today I started to migrate my app to the server and started installing everything on the server. Prior to running Tess4J in tomcat I tried to run a simple java program to make sure everything is fine and dandy. It's not...</p>
  
  <ul>
  <li>I'm on a centOS 64bit server</li>
  <li>I've installed tesseract and its working fine - <code>tesseract myimage.jpg mytext</code> produces data</li>
  </ul>
  
  <p>However, running my simple class that useses Tess4j produces this error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to
    load library 'tesseract': libtesseract.so: cannot open shared object
    file: No such file or directory</p>
  </blockquote>
  
  <p><strong>What I've done so far</strong></p>
  
  <ul>
  <li>I've ran <code>sudo ldconfig</code> after installing tesseract</li>
  <li>I've search for libtesseract.so and its found in <code>/usr/local/lib/libtesseract.so</code></li>
  </ul>
  
  <p>Folder on server contains these files:</p>
  
  <pre><code>myimge.png  
  ghost4j-0.3.1.jar  
  jai_imageio.jar  
  jna.jar  
  maslab.jar  
  pngj.jar  
  tess4j.jar  
  TesseractExample.class  
  TesseractExample.java
  </code></pre>
  
  <p>tesseract -v produces:</p>
  
  <pre><code>tesseract -v
  tesseract 3.02.02
   leptonica-1.69
    libjpeg 6b : libpng 1.2.49 : libtiff 3.9.4 : zlib 1.2.3
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>How can I make Tess4J aware that libtesseract.so does exist?<code>enter code here</code></p>