0

我需要在 Puppet 基础设施中安装 FirePHPCore 和 PEAR。

文档举了一个例子

include pear
# If no version number is supplied, the latest stable release will be
# installed. In this case, upgrade PEAR to 1.9.2+ so it can use
# pear.drush.org without complaint.
pear::package { "PEAR": }
pear::package { "Console_Table": }

# Version numbers are supported.
pear::package { "drush":
  version => "4.5.0",
  repository => "pear.drush.org",
}

我通过这种方式实现它

classes:
 - pear


pear::package:
 'PEAR':
pear::package:
 'Console_Table':


pear::package:
 'FirePHPCore':
  repository : 'pear.firephp.org'

但它不起作用。我在代理上看到错误:

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install {"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package {"FirePHPCore"=>{"repository"

Error: /Stage[main]/Pear/Package[{"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install {"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package {"FirePHPCore"=>{"repository"

看起来它解释'FirePHPCore':"FirePHPCore"=>.

任何人都可以理解有什么问题吗?

4

1 回答 1

1

所以,看起来 Rafaelfc/pear 坏了,通过 Puppet 安装 pear 模块的最简单方法如下代码:

exec { "install FirePHP":
    command => "/usr/bin/pear channel-discover pear.firephp.org && /usr/bin/pear install firephp/FirePHPCore",
    onlyif => "/usr/bin/test  `/usr/bin/pear list -c firephp | grep -c Fire` -eq 0",
  }
于 2015-01-05T07:14:54.483 回答