title: Where does rpm look for dependencies?
body: <p>I have an rpm which I have build using rpmbuild. Lets say it is sample.rpm.
  It builds successfully. The rpm has and executable (let's call it init).</p>
  
  <p>When I try to install it using <code>rpm -ivh sample.rpm</code> it shows me failed dependencies.</p>
  
  <p>Let's say the error is <code>Failed dependency for: example.so</code> which means that rpm is not able to locate this shared object file. (even though the so file exists in the same directory).</p>
  
  <p>So, I install the rpm as <code>rpm -ivh sample.rpm --nodeps</code> (as I know that I have the required so files).</p>
  
  <p>Why is rpm not able to install those rpms then?
  where does it look for the object files? (does the linux loader looks for these .so). I have LD_LIBRARY_PATH to include path to these .so and so when I run the installed file (init) from the rpm it runs.</p>
  
  <p>Then why is rpm not able to install sample.rpm (where exactly does it look for dependencies)?
  Is it something that needs to be specified at the time when the rpm is build?</p>