emyl / vagrant-triggers

Allow the definition of arbitrary scripts that will run on the host before and/or after Vagrant commands.
MIT License
546 stars 35 forks source link

ERROR: Failed to build gem native extension. #39

Closed golfhotel closed 9 years ago

golfhotel commented 9 years ago

Hello everyone.

I have done the following steps:

Installing the 'vagrant-triggers' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing ffi (1.9.7), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.7'` succeeds before bundling.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

...

(More text below)

There is an additional text-log, next to the error mentioned but I avoid writing it because it is very long. If required I can post it.

Here are the details of my host system:

Is there a way to get a better result?

Best regards.

golfhotel commented 9 years ago

Solved! For those who get the error message, try again several times to install the plugin. Probably the problem is related to transfer data from the servers involved (as mentioned in the message).

These errors are usually
caused by misconfigured plugin installations or transient network
issues.

Here a related issue: https://github.com/mitchellh/vagrant/issues/5486

vhosakot commented 7 years ago

I saw the error Failed to build gem native extension too on CentOS 7.3 and vagrant 1.8.7.

I resolved it after installing ruby-devel and gcc (yum -y install ruby-devel gcc)