Hi,
I'm new to Chef, and I'm trying to automate the installation of the Python package "pisa". I was hoping to use the "easy_install_package" function, which I'm using like:
easy_install_package "pisa" do
version "3.0.27"
end
but this throws the error:
[myhost] err: /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/ chef/shell_out.rb:232:in `invalid!': Expected process to exit 0, but it exited with 1 (Chef::Exceptions::ShellCommandFailed)
[myhost] err: ---- Begin output of python -c "import pisa; print pisa.__path__" ----
[myhost] err: STDOUT:
[myhost] err: STDERR: Traceback (most recent call last):
[myhost] err: File "<string>", line 1, in <module>
[myhost] err: ImportError: No module named pisa
[myhost] err: ---- End output of python -c "import pisa; print pisa.__path__" ----
[myhost] err: Ran python -c "import pisa; print pisa.__path__" returned 1
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/shell_out.rb:218:in `error!'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/mixin/shell_out.rb:33:in `shell_out!'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/provider/package/easy_install.rb:69:in `load_current_resource'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/resource.rb:394:in `run_action'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/runner.rb:53:in `run_action'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/runner.rb:89:in `converge'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/runner.rb:89:in `each'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/runner.rb:89:in `converge'
[myhost] err: ... 13 levels...
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/ bin/../lib/chef/application.rb:62:in `run'
[myhost] err: from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/ chef-solo:25
[myhost] err: from /usr/bin/chef-solo:19:in `load'
[myhost] err: from /usr/bin/chef-solo:19
[myhost] out: [Wed, 20 Apr 2011 21:14:43 -0400] ERROR: easy_install_package[pisa] (/tmp/chef/site-cookbooks/mysite/recipes/ default.rb:68:in `from_file') had an error:
The problem seems to be that easy_install_package is running 'python -c "import pisa; print pisa.__path__"', which of course will throw an error, because the actual module imported is called "ho.pisa", not "pisa", even though the egg file is simply called "pisa". How can modify easy_install_package to use the correct package name?
Regards,
Chris
Archive powered by MHonArc 2.6.16.