Fedora dnf | Automatically Install All Dependencies For an RPM

By | 2016/02/26

Here is how to use dnf in Fedora Linux to automatically install all dependencies for an rpm. Check it out!


You may have seen something like this before when trying to install a single rpm (whaa-waaaa):

[smiller@scottbookpro]$ sudo rpm -i mysql-workbench-community-6.3.6-1.fc23.x86_64.rpm 
warning: mysql-workbench-community-6.3.6-1.fc23.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
	libctemplate.so.3()(64bit) is needed by mysql-workbench-community-6.3.6-1.fc23.x86_64
	libtinyxml.so.0()(64bit) is needed by mysql-workbench-community-6.3.6-1.fc23.x86_64
	libvsqlitepp.so.3()(64bit) is needed by mysql-workbench-community-6.3.6-1.fc23.x86_64
	libzip is needed by mysql-workbench-community-6.3.6-1.fc23.x86_64
	libzip.so.4()(64bit) is needed by mysql-workbench-community-6.3.6-1.fc23.x86_64
	tinyxml is needed by mysql-workbench-community-6.3.6-1.fc23.x86_64
[smiller@scottbookpro]$ 

Using dnf, you can automatically install the required dependencies!

To do this, use the following command:

$ sudo dnf install ./random-rpm-to-install.rpm

Below is an example output:

[smiller@scottbookpro]$ sudo dnf install ./mysql-workbench-community-6.3.6-1.fc23.x86_64.rpm
Last metadata expiration check performed 0:01:54 ago on Fri Feb 26 12:31:04 2016.
Dependencies resolved.
==============================================================================================
 Package                         Arch         Version                Repository          Size
==============================================================================================
Installing:
 ctemplate                       x86_64       2.3-5.fc23             fedora             183 k
 libzip                          x86_64       1.1-1.fc23             updates             49 k
 mysql-workbench-community       x86_64       6.3.6-1.fc23           @commandline        24 M
 tinyxml                         x86_64       2.6.2-10.fc23          fedora              54 k
 vsqlite++                       x86_64       0.3.13-11.fc23         fedora              61 k

Transaction Summary
==============================================================================================
Install  5 Packages

Total size: 25 M
Total download size: 347 k
Installed size: 182 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): vsqlite++-0.3.13-11.fc23.x86_64.rpm                    120 kB/s |  61 kB     00:00    
(2/4): tinyxml-2.6.2-10.fc23.x86_64.rpm                       106 kB/s |  54 kB     00:00    
(3/4): ctemplate-2.3-5.fc23.x86_64.rpm                        335 kB/s | 183 kB     00:00    
(4/4): libzip-1.1-1.fc23.x86_64.rpm                            39 kB/s |  49 kB     00:01    
----------------------------------------------------------------------------------------------
Total                                                         121 kB/s | 347 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : libzip-1.1-1.fc23.x86_64                                                  1/5 
  Installing  : vsqlite++-0.3.13-11.fc23.x86_64                                           2/5 
  Installing  : tinyxml-2.6.2-10.fc23.x86_64                                              3/5 
  Installing  : ctemplate-2.3-5.fc23.x86_64                                               4/5 
  Installing  : mysql-workbench-community-6.3.6-1.fc23.x86_64                             5/5 
Warning in file "/usr/share/applications/epiphany.desktop": usage of MIME type "multipart/related" is discouraged ("multipart" is a media type that probably does not make sense in this context)
  Verifying   : mysql-workbench-community-6.3.6-1.fc23.x86_64                             1/5 
  Verifying   : ctemplate-2.3-5.fc23.x86_64                                               2/5 
  Verifying   : tinyxml-2.6.2-10.fc23.x86_64                                              3/5 
  Verifying   : vsqlite++-0.3.13-11.fc23.x86_64                                           4/5 
  Verifying   : libzip-1.1-1.fc23.x86_64                                                  5/5 

Installed:
  ctemplate.x86_64 2.3-5.fc23                            libzip.x86_64 1.1-1.fc23             
  mysql-workbench-community.x86_64 6.3.6-1.fc23          tinyxml.x86_64 2.6.2-10.fc23         
  vsqlite++.x86_64 0.3.13-11.fc23                       

Complete!

Rock on,

One thought on “Fedora dnf | Automatically Install All Dependencies For an RPM

  1. taobad

    Thanks! just use this to instal mysqlworkbench.rpm which depended on vsqlite++-0.3.13-14.fc24.x86_64 .

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.