试图安装刀-ec2

时间:2014-02-11 11:48:14

标签: chef knife

我的厨师 - 客户版本是11.10.0 试图安装刀-ec2

gem install knife-ec2

ERROR: While executing gem ... (Errno::EACCES) Permission denied - /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.1/.autotest

我尝试了其他命令:

sudo /opt/chef/embedded/bin/gem install knife-ec2
Building native extensions.  This could take a while...

错误:安装knife-ec2时出错:         错误:无法构建gem原生扩展。

     /opt/chef/embedded/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-linux-gnu/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-linux-gnu/ports/libxml2/2.8.0/compile                                                                  .log' to see what happened.
*** extconf.rb failed ***

1 个答案:

答案 0 :(得分:0)

此错误消息告诉您错过了什么:

Running 'compile' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-linux-gnu/ports/libxml2/2.8.0/compile                                                                  .log' to see what happened.
*** extconf.rb failed ***

它尝试编译libxml2但失败了。通常,您需要包含头文件的开发库来编译这些依赖项。

解决方案:

$ sudo apt-get install libxml2-dev