This post will tell you how to update or install the latest packages and RPMs in Oracle Linux.
If you are wondering what is a YUM package, well YUM or Yellow dog Update is a directory utility containing a list of all the packages which are required by the Linux OS to work with any software.
I have furnished the instructions below:
1. Login as Root
2. Navigate to the location: /etc/yum.repos.d
- command : cd /etc/yum.repos.d
3. List and see if there are files in the name of "public-yum-xxx.repo"
- command : ls -lrth or ll
4. If you do not have the file which is mentioned above, you can download it by the below command:
- Oracle Linux 5 command : wget http://public-yum.oracle.com/public-yum-el5.repo
- Oracle Linux 6 command : wget http://public-yum.oracle.com/public-yum-ol6.repo
5. Edit the files to download the latest packages by changing the parameters "enable=1" to enable and "enable=0" to disable the packages download according to the kernel parameter mentioned in the "public-yum-xxx.repo"
6. In order to download or install packages from YUM directory, any of the below commands can be used:
- Download a specific package : yum install <package name>
- Download entire YUM directory : yum update
7. If you are looking to install files with .rpm extension, download the RPM files from the internet or if you have the RPM already present in your VM, then use the below commands to install the RPMs :
- To install the RPMs : rpm -ivh <filename.rpm>
8. If you are getting a message like the "Another app is currently holding the yum lock; waiting for it to exit". use the kill command as given below:
- command : kill -9 <pid>
9. If you are getting any dependency error stating like this RPM or packages need some other package or RPM to be installed as a prequisite then use the below command :
- command : yum install <package_name>
- command : yum install <partial_package_name*>
EXAMPLE:
"yum install lib*" will install all the packages with the name starting with "lib" and yes "*" means wild character
10. Finally, If you want to know what you are installing, please use the below command:
- To list a specific package : yum list <package_name>
- To list the entire yum packages : yum list
- To list all the packages under a single name : yum list package_name*
0 comments