yum-builddep is a program to install the required RPMs to build the specified package. The SRPM package specified should be available in the YUM repository or it may be a local SRPM file. This extension is provided by the yum-utils package.
# yum-builddep sox
...
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
alsa-lib-devel i386 1.0.18-6.rc3.fc10 fedora 996 k
gsm-devel i386 1.0.12-6.fc9 fedora 12 k
libvorbis-devel i386 1:1.2.0-5.fc10 fedora 356 k
Transaction Summary
================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 368 k
Is this ok [y/N]:
$ sudo yum-builddep --nogpgcheck fox-1.6.33-1.rf.src.rpm
Loaded plugins:presto, refresh-packagekit
Getting requirements for fox-1.6.33-1.rf.src
--> Already installed : gcc-c++-4.4.4-10.fc13.x86_64
--> Already installed : autoconf-2.65-1.fc13.noarch
--> zlib-devel-1.2.3-23.fc12.x86_64
--> bzip2-devel-1.0.6-1.fc13.x86_64
--> 2:libpng-devel-1.2.44-1.fc13.x86_64
--> Already installed : libXext-devel-1.1.2-2.fc13.x86_64
--> Running transaction check
---> Package bzip2-devel.x86_64 0:1.0.6-1.fc13 set to be installed
--> Processing dependencies: bzip2-libs = 1.0.6-1.fc13 for the package: bzip2-devel-1.0.6-1.fc13.x86_64
---> Package libpng-devel.x86_64 2:1.2.44-1.fc13 set to be installed
---> Package zlib-devel.x86_64 0:1.2.3-23.fc12 set to be installed
--> Running Transaction Test
---> Package bzip2-libs.x86_64 0:1.0.6-1.fc13 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================
Package Arch Version Repository Size
===========================================================================================
Installing:
bzip2-devel x86_64 1.0.6-1.fc13 updates 217 k
libpng-devel x86_64 2:1.2.44-1.fc1 updates 111 k
zlib-devel x86_64 1.2.3-23.fc12 fedora 40 k
Updating for dependencies:
bzip2-libs x86_64 1.0.6-1.fc13 updates 36 k
Transaction Summary
===========================================================================================
Install 3 Package(s)
Upgrade 1 Package(s)
Total download size: 405 k
Is this ok [y/N]:
Note that it only installs the missing packages.