Search code examples
apachepuppetrpmcentos7perl-module

How to install rpm package from Puppet (Failed dependencies)


I am trying to install perl-Apache-DBI on Centos7 with Puppet (puppetserver version: 2.7.2, puppet: 4.8.1).

Manually, I would just download the rpm package from this page and install it with yum (yum install perl-Apache-DBI-1.12-1.el7.noarch.rpm).

In Puppet I tried:

package { perl-Apache-DBI:
  provider => 'rpm',
  ensure => installed,
  source => "https://harbottle.gitlab.io/epmel/7/x86_64//perl-Apache-DBI-1.12-1.el7.noarch.rpm",
}

And have error:

Error: Execution of '/bin/rpm -i https://harbottle.gitlab.io/epmel/7/x86_64//perl-Apache-DBI-1.12-1.el7.noarch.rpm' returned 1:
warning: /var/tmp/rpm-tmp.SKxxuP: Header V4 RSA/SHA256 Signature, key ID 540ecf1b: NOKEY
error: Failed dependencies:
perl(Digest::SHA1) >= 2.01 is needed by perl-Apache-DBI-1.12-1.el7.noarch
perl(Test::Simple) is needed by perl-Apache-DBI-1.12-1.el7.noarch

Also, I tried to use the yum provider in the package resource, but it does not work either.


Solution

  • The best path for me is probably to subscribe to a repo with that package and then install with yum.