why does yum need to run after rpm?

Issues related to applications and software problems
Post Reply
mauricev
Posts: 5
Joined: 2019/07/01 17:53:28

why does yum need to run after rpm?

Post by mauricev » 2019/07/12 06:19:20

The instructions for installing NVIDIA CUDA are as follows where the rpm is a downloaded file in the current directory

Code: Select all

`sudo rpm -i cuda-repo-rhel7-10-1-local-10.1.168-418.67-1.0-1.x86_64.rpm`
`sudo yum clean all`
`sudo yum install cuda`
Why do I need to run "yum clean all" after running "rpm -i"?

What does "rpm -i" not do that requires me to run "yum install cuda"?

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: why does yum need to run after rpm?

Post by stevemowbray » 2019/07/12 11:22:10

The rpm command installs the files needed to set up the CUDA repository for yum. The yum command installs CUDA from that repository.

User avatar
jlehtone
Posts: 4531
Joined: 2007/12/11 08:17:33
Location: Finland

Re: why does yum need to run after rpm?

Post by jlehtone » 2019/07/13 11:52:40

Outdated and thus unnecessarily confusing instructions.

Code: Select all

`sudo yum install cuda-repo-rhel7-10-1-local-10.1.168-418.67-1.0-1.x86_64.rpm`
`sudo yum clean all`
`sudo yum install cuda`
The yum can install a local package file. The yum can download and install a package file from URL too. There is no need to call rpm at all.

In fact, yum keeps track of what it has done. Calling rpm directly act behind the back of yum and then yum's history becomes less trustworthy.


What is in that " cuda-repo-rhel7-10-1-local-*.rpm"? Definition of a yum repository. Yum can find/see/access that repository after the package is installed.

The repository contains packages for a CUDA release. You have to install (some of) those packages if you want to use CUDA. You cannot install those packages unless you/yum know where they are. That is why you have to add the repository config first.


The 'clean all' is debatable; if you did not have cuda repository previously, then yum has nothing outdated in the cache.

Post Reply