我在尝试在AWS上的节点上安装PHP时遇到了一些问题(使用OS Amazon AMI,即某种Red Hat)。 当我尝试运行chef-solo时,我收到了这个输出:
================================================================================
Error executing action `install` on resource 'yum_package[php-mysql]'
================================================================================
Chef::Exceptions::Exec
----------------------
yum -d0 -e0 -y install php-mysql-5.3.29-1.8.amzn1 returned 1:
STDOUT: You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
STDERR: Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Cookbook Trace:
---------------
/home/ec2-user/chef-repo/localrepo/chef/local-mode-cache/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /home/ec2-user/chef-repo/localrepo/chef/local-mode-cache/cache/cookbooks/php/recipes/module_mysql.rb
22: package node['php']['mysql']['package'] do
23: action :install
24: end
Compiled Resource:
------------------
# Declared in /home/ec2-user/chef-repo/localrepo/chef/local-mode-cache/cache/cookbooks/php/recipes/module_mysql.rb:22:in `from_file'
yum_package("php-mysql") do
package_name "php-mysql"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "php"
recipe_name "module_mysql"
flush_cache {:before=>false, :after=>false}
end
Platform:
---------
x86_64-linux
这是我的食谱和配置文件的回购:
感谢您的帮助!