Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

Não consigo instalar o plugin da Amazon no Vagrant

Não estou conseguindo instalar o plugin da Amazon AWS no Vagrant. Dou o seguinte comando:

vagrant plugin install vagrant-aws

E ocorre a seguinte mensagem de erro:

Installing the 'vagrant-aws' plugin. This can take a few minutes...
/usr/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:4:in `<main>'


Gem files will remain installed in /home/alexandre/.vagrant.d/gems/gems/nokogiri-1.6.8 for inspection.
Results logged to /home/alexandre/.vagrant.d/gems/gems/nokogiri-1.6.8/ext/nokogiri/gem_make.out
    from /usr/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
    from /usr/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
    from /usr/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
    from /usr/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
    from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
    from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
    from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
    from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
    from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:65:in `block in call'
    from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /usr/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
    from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:52:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in `block in run'
    from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in `run'
    from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:17:in `action'
    from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:27:in `execute'
    from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:38:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:484:in `cli'
    from /usr/bin/vagrant:127:in `<main>'

Até o momento, não tinha tido maiores problemas para acompanhar o curso. Alguém sabe o que pode ser isso?

4 respostas
solução!

Oi Alexandre

Pelo que pesquisei é a falta do pacote dev do Ruby que você tem na máquina.

Tente atualizar para uma versão mais recente por favor:

sudo apt-get install ruby-dev

Se não der certo me avise por favor.

Oi Caio

Por enquanto, obrigado. Quando estiver acesso à máquina em que estou fazendo curso irei testar (acredito que hoje à noite) e te digo se funcionou.

Funcionou, obrigado!

~$ vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.7.2)'!

Só pra constar mais uma alternativa:

Aqui eu solucionei removendo o vagrant e instalando ele via download do site (estou usando ubuntu 16.04 como SO de base)

:)