On Vagrant up
Issue:
FATAL: Mixlib::ShellOut::ShellCommandFailed: php_pear[apc] (drupal::minimal line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of echo -e "\r" | pear -d preferred_state=stable install -a apc-3.1.6 ----
STDOUT: No releases available for package "pear.php.net/apc" - package pecl/apc can be installed with "pecl install apc"
install failed
Running:
Vagrant 1.2.2
Virtualbox 4.2.12
vagrant-7.x-1.x-dev
Solution:
Had to manually install apc
then rem it out of the recipe
(I tried rolling back Vagrant to 1.0x not 1.1+, no change)
Process to fix it:
vagrant ssh
sudo pecl install apc
sudo nano /tmp/vagrant-chef-1/chef-solo-2/cookbooks/drupal/recipes/minimal.rb
rem out
#php_pear "apc" do
# directives(:shm_size => "70M", :rfc1867 => 1, :include_once_override => 0)
# version "3.1.6" # TODO Somehow Chef PEAR/PECL provider causes debugging to be enabled on later builds.
# action :install
#end
? Real solution may be something like…
case node['platform_family']
when "rhel", "fedora"
%w{ httpd-devel pcre pcre-devel }.each do |pkg|
package pkg do
action :install
end
end
php_pear "apc" do
action :install
directives(:shm_size => "128M", :enable_cli => 0)
end
when "debian"
package "php-apc" do
action :install
end
end
-----------