Vagrant and Chef:PHPの新しいバージョンをインストールする方法は?

StackOverflow https://stackoverflow.com/questions/8902946

  •  29-10-2019
  •  | 
  •  

質問

私は比較的使用されています Vagrantシェフ. 。現在、Ubuntu Lucid 64を実行しています opscode php cookbook デフォルトでは、PHP 5.3.2をパッケージとしてインストールします。 PHP 5.3.8または9(ソースからまたはパッケージから)をインストールしたいのですが、正しく構成する方法を理解できないようです。依存する料理本(ビルドエッセンシャル、XML、MySQL)をコピーしました。これは私がこれまでに持っているものです:

# vagrant_main/recipes/default.rb

require_recipe "apt"

node.override["php"]["version"] = "5.3.9"
require_recipe "php::source"

しかし、私はエラーが発生しています。スタックトレースの関連する行は次のとおりです。

NameError: wrong constant name DebianBeforeSqueeze?
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:56:in `const_defined?'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:56:in `method_missing'
/tmp/vagrant-chef-1/chef-solo-1/mysql/recipes/client.rb:26:in `from_file'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/cookbook_version.rb:578:in `load_recipe'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/language_include_recipe.rb:40:in `include_recipe'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/opt/ruby/lib/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/tmp/vagrant-chef-1/chef-solo-1/php/recipes/source.rb:25:in `from_file'

アップデート: PHPレシピにmysqlについて心配しないように言うと、正常にインストールされているようです...

node.override["php"]["version"] = "5.3.9"
node.override["php"]["configure_options"]["mysql"] = false
require_recipe "php::source"

...しかし、Apacheは実行中のPHPバージョンを知らないようです。 php_info() PHP 5.3.2を使用しているが、コマンドラインを使用していると報告しています(php -v)5.3.9を正しく報告しています。

私は何が間違っているのですか?

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top