無效的套件提供者“pear”

無效的套件提供者“pear”

我正在建立一個清單以在 CentOS 6 電腦上安裝 LAMP。除了安裝一些梨子模組之外,一切正常。發佈時puppet /etc/puppet/modules/webserver/manifests/init.pp我得到以下資訊:

/etc/puppet/modules/webserver/manifests/init.pp:111 中的套件提供者「pear」無效

以下是清單的相關部分,包括底部的包含順序:

class php {

  package {'php':
    ensure => present,  
    before => File['/etc/php.ini'],
  }

  file {'/etc/php.ini':
    ensure => file,
  }

  $packagelist = [
    "php-cli",
    "php-common",
    "php-devel",
    "php-gd",
    "php-ldap",
    "php-mbstring",
    "php-mssql",
    "php-mysql",
    "php-pear",
    "php-pecl-ssh2",
    "php-xml"
  ]

  package { $packagelist:
    ensure => installed,
    require => Package['php'],
    notify => Service['httpd'],
  }

class pear {
  package {
     "pear":
        ensure => installed,
        provider => 'pear';
     "pecl/zip":
        ensure => installed,
        provider => 'pear';
  }
}

include php
include pear

我可以註解掉include pear底部的行,其餘部分即可順利安裝。 rpm -qa | grep php-pear顯示軟體包 php-pear 已成功安裝。pear在提示符號下發出會傳回預期的 Pear 幫助選單。

如果我返回 init.pp 文件,取消註釋include pear並重新運行puppet /etc/puppet/modules/webserver/manifests/init.pp,則會出現相同的錯誤。

是什麼賦予了?

答案1

透過升級到 Puppet 2.27,然後使用 puppet-pear 模組來解決。

https://rubygems.org/gems/puppet/versions/2.7.23

https://github.com/rafaelfelix/puppet-pear

相關內容