doubinchou4219 2014-05-29 16:56
浏览 107

使用Puppet和Vagrant安装特定的PHP版本

First time puppet user, and I'm having trouble getting an install of a specified version of PHP using Vagrant. I'm using the example42/php module, and I keep running into ensure problems.

Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install php-5.5.12' returned 1: Error: Nothing to do
Error: /Stage[main]/Php/Package[php]/ensure: change from absent to 5.5.12 failed: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install php-5.5.12' returned 1: Error: Nothing to do
Warning: /Stage[main]/Php/File[php.conf]: Skipping because of failed dependencies

spits out of my console, followed by another attempt that's identical.

My .pp file I'm provisioning with:

class lamp {
    # package {'php':
    #   ensure => present,
    # }
}
node 'node1' {  
    include lamp
    file { '/php':
        ensure => directory,
        # I read that I may need to have a directory in order for the install to work...
    }
    class { 'php':
        version => '5.5.12',
    }
}

As far as I can tell, I'm referencing correctly to the modules, which I store inside /puppet/modules/ and it's finding them, but I'm having a hard time getting a specific version of PHP to install. I could use a very simple "getting started LAMP" for Puppet but that only install 5.3.3 even if I ensure => latest,

  • 写回答

1条回答 默认 最新

  • dsdioa9545 2014-05-29 17:11
    关注

    The puppet module only uses your system's package manager (yum) to download specific php packages. If it cannot find the required packages, it will not work. 5.3.3 is latest version in your repository, so it install that. I wouldn't be surprised if this is the only version of php available in your repositories.

    You need to configure yum with some repositories which have the required PHP packages and then try the puppet module with that.

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器