Trying to install knife-ec2

允我心安 提交于 2019-12-12 06:40:12

问题


my chef-client version is 11.10.0 trying to install knife-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

i tried with other command:

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

ERROR: Error installing knife-ec2: ERROR: Failed to build gem native extension.

     /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:


This error message tells what you missed:

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 ***

It tries to compile libxml2 but fails. Usually you need development library that contains header files to compile those dependencies.

Solution:

$ sudo apt-get install libxml2-dev


来源:https://stackoverflow.com/questions/21700986/trying-to-install-knife-ec2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!