apache2 - Unable to install using chef-apply -


system - info

linux chef-virtualbox 3.13.0-32-generic #57~precise1-ubuntu smp tue jul 15 03:50:54 utc 2014 i686 i686 i386 gnu/linux 

chef version

chef: 12.4.1 

vi webserver.rb

package 'apache2' 

locale

lang=en_in language=en_in:en lc_ctype="en_in" lc_numeric="en_in" lc_time="en_in" lc_collate="en_in" lc_monetary="en_in" lc_messages="en_in" lc_paper="en_in" lc_name="en_in" lc_address="en_in" lc_telephone="en_in" lc_measurement="en_in" lc_identification="en_in" lc_all= 

note:

lc_all= blank 

sudo chef-apply webserver.rb

recipe: (chef-apply cookbook)::(chef-apply recipe) * apt_package[apache2] action install  ================================================================================ error executing action `install` on resource 'apt_package[apache2]' ================================================================================  mixlib::shellout::shellcommandfailed ------------------------------------ expected process exit [0], received '100' ---- begin output of apt-get -q -y install apache2=2.2.22-1ubuntu1.10 ---- stdout: reading package lists... building dependency tree... reading state information... following packages automatically installed , no longer required:   x11-apps libxrandr-ltst2 x11-xfs-utils libtxc-dxtn-s2tc0   libwayland-ltst-server0 libxcb-xfixes0 libdrm-nouveau2 xinit   x11-session-utils libfs6 libxvmc1 libxcb-dri2-0 libwayland-ltst-client0   libllvm3.4 use 'apt-get autoremove' remove them. following packages installed:   apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1   libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap suggested packages:   apache2-doc apache2-suexec apache2-suexec-custom following new packages installed:   apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common   libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap 0 upgraded, 9 newly installed, 0 remove , 236 not upgraded. need 1836 kb of archives. after operation, 5230 kb of additional disk space used. warning: following packages cannot authenticated!   libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap stderr: e: there problems , -y used without --force-yes ---- end output of apt-get -q -y install apache2=2.2.22-1ubuntu1.10 ---- ran apt-get -q -y install apache2=2.2.22-1ubuntu1.10 returned 100  resource declaration: --------------------- # in webserver.rb    1: package 'apache2'   compiled resource: ------------------ # declared in webserver.rb:1:in `run_chef_recipe'  apt_package("apache2")   action [:install]   retries 0   retry_delay 2   default_guard_interpreter :default   package_name "apache2"   version "2.2.22-1ubuntu1.10"   declared_type :package   cookbook_name "(chef-apply cookbook)"   recipe_name "(chef-apply recipe)" end  [2015-08-05t17:18:54+05:30] fatal: stacktrace dumped /var/chef/cache/chef-stacktrace.out [2015-08-05t17:18:54+05:30] fatal: mixlib::shellout::shellcommandfailed: apt_package[apache2] ((chef-apply cookbook)::(chef-apply recipe) line 1) had error: mixlib::shellout::shellcommandfailed: expected process exit [0], received '100' ---- begin output of apt-get -q -y install apache2=2.2.22-1ubuntu1.10 ---- stdout: reading package lists... building dependency tree... reading state information... following packages automatically installed , no longer required:   x11-apps libxrandr-ltst2 x11-xfs-utils libtxc-dxtn-s2tc0   libwayland-ltst-server0 libxcb-xfixes0 libdrm-nouveau2 xinit   x11-session-utils libfs6 libxvmc1 libxcb-dri2-0 libwayland-ltst-client0   libllvm3.4 use 'apt-get autoremove' remove them. following packages installed:   apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1   libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap suggested packages:   apache2-doc apache2-suexec apache2-suexec-custom  following new packages installed: 

apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap 0 upgraded, 9 newly installed, 0 remove , 236 not upgraded. need 1836 kb of archives. after operation, 5230 kb of additional disk space used. warning: following packages cannot authenticated! libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap stderr: e: there problems , -y used without --force-yes ---- end output of apt-get -q -y install apache2=2.2.22-1ubuntu1.10 ---- ran apt-get -q -y install apache2=2.2.22-1ubuntu1.10 returned 100 chef@chef-virtualbox:~/chef-repo$

updated webserver.rb below

package 'apache2'     options '--force-yes' end 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -