title: pg_ctl: error while loading shared libraries: libpq.so.5
body: <p>I'm trying to get postgres server status with:</p>
  
  <pre><code>sudo /etc/init.d/postgres status -u postgres
  </code></pre>
  
  <p>But getting following error:</p>
  
  <pre><code>/home/alex/olddisk/usr/local/pgsql/bin/pg_ctl: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>I added:</p>
  
  <pre><code>export LD_LIBRARY_PATH=""
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/"
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/alex/olddisk/usr/local/pgsql/lib/"
  </code></pre>
  
  <p>to my <code>.bashrc</code>, but it didn't help.</p>
  
  <p>Thank you.</p>