Niamh Holding wrote on 10/12/20 12:01 am:
rpm -ivh spamassassin-3.4.4-1.el7.centos.x86_64.rpm error: Failed dependencies: perl(BSD::Resource) is needed by spamassassin-3.4.4-1.el7.centos.x86_64 perl(Net::CIDR::Lite) is needed by spamassassin-3.4.4-1.el7.centos.x86_64
1. The CentOS 7 repository does not contain spamassassin-3.4.4-1, nor does a search on rpmfind show any el7 build for that version of SpamAssassin. If you got this rpm from an unofficial source who perhaps built it from the source rpm for Spamassassin 3.4.4 in the Fedora repo, talk to whoever did that about how they built the package and how they install it on CentOS.
2. Using the rpm command to install a local rpm file does not automatically install dependencies from a repo. Always use yum (or dnf in newer CentOS or in Fedora) instead of the now old rpm program.
3. Those packages listed in the error message are available for CentOS 7 in the EPEL repo. Often packages that are built from a source rpm that was written for Fedora will depend on packages that are not in the main CentOS repo but have been ported to EPEL. It is a good idea when trying to port a package from Fedora to CentOS to install the EPEL repo so yum will also look there for dependencies. That and using yum instead of rpm command would have solved this particular dependency error.
4. See point 1. Even if you try suggestions based on 2 and 3, there is no guarantee that the spamassassin-3.4.4-1.el7.centos.x86_64.rpm you have was properly built.