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.

[cd]

name=CD

baseurl=file:///mnt/Server

enabled=1

gpgcheck=0

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

About these ads
  1. May 29, 2012 at 9:36 pm | #1

    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 | #2

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

  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

Follow

Get every new post delivered to your Inbox.

Join 49 other followers

%d bloggers like this: