LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   About rpm n yum (https://www.linuxquestions.org/questions/linux-newbie-8/about-rpm-n-yum-938213/)

ravi_nandula 04-05-2012 12:55 AM

About rpm n yum
 
Hi everyone,
As far my knowledge rpm n yum both are used for package management ....but when im using rpm command in RHEL 5 for a particular package is showing the error message..."open of files failed: no such file r directory "....

So my doubt is when I should use rpm n yum....can anyone clearly explain it............

druuna 04-05-2012 01:09 AM

Hi,

Without knowing what commands you actually used it is hard to troubleshoot your problem. Both yum and rpm should be able to install packages.

In general:

Yum is build upon rpm. It is more intelligent (takes care of dependencies etc).

If at all possible use yum instead of rpm. This from the docs:
Quote:

For most package management tasks, the Yum package manager offers equal and often greater capabilities and utility than RPM. Yum also performs and tracks complicated system dependency resolution, and will complain and force system integrity checks if you use RPM as well to install and remove packages. For these reasons, it is highly recommended that you use Yum instead of RPM whenever possible to perform package management tasks.
Here are 2 links to the appropriate rpm/yum chapters:
- RPM (RedHat)
- Yum (RedHat)

Hope this helps.

sujithspillai90 04-05-2012 03:05 AM

Quote:

Originally Posted by ravi_nandula (Post 4645134)
Hi everyone,
As far my knowledge rpm n yum both are used for package management ....but when im using rpm command in RHEL 5 for a particular package is showing the error message..."open of files failed: no such file r directory "....

So my doubt is when I should use rpm n yum....can anyone clearly explain it............



YUM will install the packages from the repository. If you search the particular package that you want you install,

Syntax: #yum search <package_name>

It will show you the available packages in the repository.

then you can install this package with yum
Syntax #yum install <package name>

And for rpm, First you try whether the package is there in your system by using
#rpm -qa |grep <package_name>

If not present ..try to download the necessary package from the available sources (depends up on your OS)

then try to install rpm package
#rpm -ivh <package_name>

you can also check #rpm qi <package_name> - will show you the details of installaed packages
and #rpm -ql <package_name> will show you the contents of the package.


YUM - will install automatically with out any dependency....but with rpm..you need to specify if a particular package needs any depedency..

Both are very simple and very helpful to install the packages......

Hope this helps................


All times are GMT -5. The time now is 06:13 PM.