在我的“Vagrant”文件中,我有这一行:
chef.add_recipe("php::module_apc")
但它给了我这个错误:
[2013-01-11T22:14:53+00:00] INFO: Processing package[php-apc] action install (php::module_apc line 34)
================================================================================
Error executing action `install` on resource 'package[php-apc]'
================================================================================
Chef::Exceptions::Exec
----------------------
apt-get -q -y install php-apc=3.1.7-1 returned 100, expected 0
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/recipes/module_apc.rb
33: when "debian"
34: package "php-apc" do
35: action :install
36: end
37: end
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/recipes/module_apc.rb:34:in `from_file'
package("php-apc") do
retry_delay 2
retries 0
recipe_name "module_apc"
action [:install]
cookbook_name :php
package_name "php-apc"
end
[2013-01-11T22:14:53+00:00] ERROR: Running exception handlers
[2013-01-11T22:14:53+00:00] ERROR: Exception handlers complete
[2013-01-11T22:14:53+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-01-11T22:14:53+00:00] FATAL: Chef::Exceptions::Exec: package[php-apc] (php::module_apc line 34) had an error: Chef::Exceptions::Exec: apt-get -q -y install php-apc=3.1.7-1 returned 100, expected 0
Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
我之前也运行过这个:
chef.add_recipe("apt")
但这也无济于事。
任何想法如何解决这一问题?非常感谢!
顺便说一句,我正在使用 OpsCode 的所有食谱: https ://github.com/opscode-cookbooks/