0

I need to install php 5.6 and some php modules on a Red Hat 7.4 server which is managed using puppet. Here's my init.pp file:

package {"epel-release":
  provider=>rpm,
  ensure=>installed,
  install_options => ['--nodeps'],
  source=> "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm",
}

package {"ius-release":
  provider=>rpm,
  ensure=>installed,
  install_options => ['--nodeps'],
  source => "https://centos7.iuscommunity.org/ius-release.rpm",
  require => Package["epel-release"],
}

$php_packages = ['php56u', 'php56u-devel', 'php56u-intl', 'php56u-ldap', 'php56u-mysqli', 'php56u-xsl', 'php56u-gd', 'php56u-mbstring', 'php56u-mcrypt']

package { $php_packages:
  ensure  => 'installed',
}

xsl and mysqli fail to install. All other packages install correctly. Here are the errors:

Error: Execution of '/bin/yum -d 0 -e 0 -y list php56u-xsl' returned 1: 
Error: No matching Packages to list
Error: Execution of '/bin/yum -d 0 -e 0 -y list php56u-mysqli' returned 1: 
Error: No matching Packages to list

All packages in development environment (Centos 7.3) install correctly using the following:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh epel-release-latest-7*.rpm

wget https://centos7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm

sudo yum install php56u php56u-devel php56u-intl php56u-ldap php56u-mysqli 
php56u-xsl php56u-gd php56u-mbstring php56u-mcrypt

I don't understand how php56u-xsl can be installed on Centos but not on Red Hat when I have the same rpms enabled on both. Apologies for the wall of text. Getting to the point:

Do rmps contain different packages per OS?
Does anyone know a way I can get php56u-xsl installed on a red hat server?

  • What's actually happening is yum is resolving php56u-xsl to php56u-xml. You can observe just that by running `yum install php56u-xsl`. I don't know much about puppet but it appears it requires exact package names, not virtual provides. – carlwgeorge Feb 26 '18 at 19:11

1 Answers1

0

Solution using webtatic rather than ius rpms. https://webtatic.com/packages/php56/ provides a list of packages as well as the packages they provide. php56w-xml provides php-xsl which was my main issue. Here's the updated puppet file:

  package {"epel-release":
    provider=>rpm,
    ensure=>installed,
    install_options => ['--nodeps'],
    source=> "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm",
  }

  package {"webtatic-release":
    provider=>rpm,
    ensure=>installed,
    install_options => ['--nodeps'],
    source => "https://mirror.webtatic.com/yum/el7/webtatic-release.rpm",
    require => Package["epel-release"],
  }

  $php_packages = ['php56w', 'php56w-devel', 'php56w-intl', 'php56w-ldap', 'php56w-mysql', 'php56w-xml', 'php56w-gd', 'php56w-mbstring', 'php56w-common']

  package { $php_packages:
    ensure   => 'installed',
    require  => Package['webtatic-release']
  }  
  • Full disclosure, I'm part of the IUS project. I've got nothing against Webtatic, but that is irrelevant to the solution here. The important part is using the exact package name, not the virtual provides. This would have worked just fine with php56u-xml from IUS as well. – carlwgeorge Feb 26 '18 at 19:14