Ask Your Question

Duplicate declaration: Package[php] with puppetlabs/apache and example42-php

asked 2014-04-30 04:31:54 -0600

cweiske gravatar image

My script tries to configure both apache and PHP. I've installed puppetlabs/apache and example42-php.

The script is:

class { 'apache':
  mpm_module => 'prefork',
include ::apache::mod::php
php::module { "gd": }

Applying it leads to the following error on redhat:

Duplicate declaration: Package[php] is already declared in file /etc/puppet/modules/apache/manifests/mod.pp at line 66; cannot redeclare at /etc/puppet/modules/php/manifests/init.pp:238 on node

What can I do to fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-30 06:12:11 -0600

cweiske gravatar image

I got rid of example42-php and installed the php modules via package:

$pkg_php_apc = $operatingsystem ? {
  RedHat  => 'php-pecl-apc',
  default => 'php-apc',
package { $pkg_php_apc:
  notify => Class['apache'],
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-04-30 04:31:54 -0600

Seen: 1,493 times

Last updated: Apr 30 '14