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
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!
AWESOME work! This probably saved me 4-6 hrs of unnecessary work.
Thanks for this helpful tip!
Many thanks dear as it is very helpful link to install rpms with dep.
Gracias!!!