-1
[root@cimnfsclient rajan]# rpm -i nfs-utils-1.3.0-0.68.el7.1.x86_64.rpm

error: Failed dependencies:
quota is needed by nfs-utils-1:1.3.0-0.68.el7.1.x86_64

I am not sure why i am getting this

hostnamectl
Static hostname: cimnfsclient
Icon name: computer-vm
Chassis: vm
Machine ID: 4f241c5567164542ad656857ca51ee58
Boot ID: 19f292b5bef4418eae63e0c1fb995cbb
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.36.2.el7.x86_64
Architecture: x86-64
ajgringo619
  • 3,113
  • 1
  • 11
  • 37

1 Answers1

2

RPM packages can depend upon other packages to provide necessary functionality (and most of them do). The rpm command cannot fetch these dependencies by itself, which is why the error is displayed. As a simple example, if foo.rpm requires 'bar' as a dependency, you need to get the appropriate bar.rpm and then install with rpm -i foo.rpm bar.rpm.

For this use case (package management), the common approach on CentOS 7 is to use yum, which presents a higher level abstraction compared to rpm. yum can resolve and fetch dependencies automatically, so you simply need to do yum install nfs-utils.

If you absolutely need to use rpm for this, you need a way to work out the dependency tree (since dependency packages can have their own dependencies) and then collect all of the necessary packages. This page should be a useful reference for the task (see the 'Requires' sub-section): https://centos.pkgs.org/7/centos-x86_64/nfs-utils-1.3.0-0.68.el7.x86_64.rpm.html

Haxiel
  • 8,201
  • 1
  • 20
  • 30