Skip to content

Instantly share code, notes, and snippets.

@nicdoye
Created April 3, 2016 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicdoye/656aea45901a758942e47df9333ece59 to your computer and use it in GitHub Desktop.
Save nicdoye/656aea45901a758942e47df9333ece59 to your computer and use it in GitHub Desktop.
Find all RPMs providing libraries to your custom-built software
# Find all RPMs of libraries for binaries in this folder
rpm -qf $(ldd * | grep = | awk '{print $3}' | sort -u | grep ^/) | sort -u
# Similarly, for all .so files under this folder
rpm -qf $(find . -name \*.so -exec ldd {} \; | grep = | awk '{print $3}' | sort -u | grep ^/) | sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment