Check RPM dependencies
In fact that's not a one but four different questions :).
*) First you can quickly list a downloaded package's dependencies/requirements by using the following commands:
$ rpm -qp mypackage.rpm --provides
$ rpm -qp mypackage.rpm --requires
*) Second, you can use yum
utility in order to satisfy these (somewhat cryptic) dependencies automatically (assuming that all your repositories are set up correctly, and all the dependencies are available):
$ sudo yum install mypackage.rpm
*) Third, there are several RPM search resources, some of them already suggested above. I'd like to list another one, just for the reference - pkgs.org.
*) Fourth, there is an additional popular repository for RHEL5 and RHEL6 distros - EPEL. Note that it's not supported by Red Hat.
Hope my answer(s) will help.
Checking for missing dependencies without installing an RPM
Use yum-downloadonly
http://www.cyberciti.biz/faq/yum-downloadonly-plugin/
How to make rpm auto install dependencies
Create a (local) repository and use yum
to have it resolve the dependencies for you.
The CentOS wiki has a nice page providing a how-to on this. CentOS wiki HowTos/CreateLocalRepos.
Summarized and further minimized (not ideal, but quickest):
- Create a directory for you local repository, e.g.
/home/user/repo
. - Move the RPMs into that directory.
Fix some ownership and filesystem permissions:
# chown -R root.root /home/user/repo
Install the
createrepo
package if not installed yet, and run# createrepo /home/user/repo
# chmod -R o-w+r /home/user/repoCreate a repository configuration file, e.g.
/etc/yum.repos.d/myrepo.repo
containing[local]
name=My Awesome Repo
baseurl=file:///home/user/repo
enabled=1
gpgcheck=0Install your package using
# yum install packagename
Related Topics
Number of Processors/Cores in Command Line
Must My Pidfile Be Located in /Var/Run
How to Convert a PDF into Jpg with Command Line in Linux
How to Find Files Recursively by File Type and Copy Them to a Directory
How to Convert an Image to Grayscale via the Command Line
Fast Linux File Count for a Large Number of Files
The Difference Between Initrd and Initramfs
Using Sed to Split a String with a Delimiter
How to Limit the Number of Results Returned from Grep
What Is Difference Between Arm64 and Armhf
How to Get the Nvidia Driver Version from the Command Line
How to Know If I'm Running a Nested Shell
A Modification to %Esp Cause Sigsegv