Home > Linux, Linux commands > How To Use YUM To Install RPM Packages with Dependencies?

How To Use YUM To Install RPM Packages with Dependencies?

Sometimes, We can not install rpm packages with “rpm -ivh” command. Because there are some dependencies. We can install rpm packages and also its dependencies with YUM.  How to use YUM to install RPM packages with dependencies?

1- Login as root

2-  Right click CDROM icon and click “Settings” menu on VMWare .

3- Click “Browse” button.

4- Choose your  Oracle Enterprise Linux 5.7  installation iso file.

5- Check “Connectted” and “Connect at power on” check boxes and  click OK.

6- You will see CDROM icon on the desktop

7- Right click on the desktop and open terminal window.

8- Mount CDROM to /mnt directory

# mount /dev/cdrom /mnt

Go directory  /etc/yum.repos.d

# cd /etc/yum.repos.d

Create cd.repo file with VI

# vi cd.repo

9- Write following lines to this file and save it.






10- Verify it.

# yum repolist

You can see rpm list.

# yum list

And install rpm package easily with its dependecies.

# yum install kernel-headers

Talip Hakan Öztürk

  1. May 29, 2012 at 9:36 pm

    Here’s my hat tip to you, you just saved my day… I’ve inherited a RHEL install and used this to install the dev tools on it. Awesome!

  2. July 8, 2012 at 12:48 am

    AWESOME work! This probably saved me 4-6 hrs of unnecessary work.

  3. Oscar Yerpes
    March 18, 2014 at 7:13 am

    Thanks for this helpful tip!

  4. Mafaz Ahmed
    August 19, 2015 at 7:47 am

    Many thanks dear as it is very helpful link to install rpms with dep.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: