title: Error loading shared libraries libclntsh.so.11.1 cannot open
body: <blockquote>
    <p>Error while loading shared libraries: libclntsh.so.11.1 : cannot open
    shared obj file no such file.  When running from crontab.</p>
  </blockquote>
  
  <p>I complied my c++ program, its a proc program after compiling proc I will run the below command.</p>
  
  <pre><code>g++ filename.CPP -I $ORACLE_HOME/precomp/public -L $ORACLE_HOME/lib -lclntsh -o test 
  </code></pre>
  
  <p>I created a crontab to run it every min</p>
  
  <pre><code>$ crontab -l
  * * * * * /home/test &gt; /home/te.txt 2&gt;&amp;1 
  </code></pre>
  
  <p>I made a symbolic link of that library. But I'm getting above error inside te.txt</p>
  
  <p>Im searching this for past 2 days and also went through the similar question, but still I not able to clear the error. </p>
  
  <p>I'm not sure with <code>LD_Library_path</code> or <code>.bash_profile</code>. how to include that library.</p>