-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install nio4r gem via Vagrant plugin #2402
Comments
Same here. vagrant.d/gems/gems/nio4r-0.5.0/ext/nio4r/gem_make.out /Applications/Vagrant/embedded/bin/ruby extconf.rb Provided configuration options: |
"gcc -o conftest -I/Applications/Vagrant/embedded/include/ruby-1.9.1/x86_64-darwin12.3.0 -I/Applications/Vagrant/embedded/include/ruby-1.9.1/ruby/backward -I/Applications/Vagrant/embedded/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/vagrant-installer/staging/embedded/include -I/vagrant-installer/staging/embedded/include -L/vagrant-installer/staging/embedded/lib -fno-common -pipe conftest.c -L. -L/Applications/Vagrant/embedded/lib -L/vagrant-installer/staging/embedded/lib -L. -I/vagrant-installer/staging/embedded/include -L/vagrant-installer/staging/embedded/lib -Wl,-rpath,@loader_path/../lib -Wl,-rpath,@executable_path/../lib -L/vagrant-installer/staging/embedded/lib -arch x86_64 -lruby.1.9.1 -lpthread -ldl -lobjc " |
Now another new Vagrant bug. have_header: checking for port.h... -------------------- no "gcc -I/Applications/Vagrant/embedded/include/ruby-1.9.1/x86_64-darwin12.3.0 -I/Applications/Vagrant/embedded/include/ruby-1.9.1/ruby/backward -I/Applications/Vagrant/embedded/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/vagrant-installer/staging/embedded/include -I/vagrant-installer/staging/embedded/include -L/vagrant-installer/staging/embedded/lib -fno-common -pipe -arch x86_64 -c conftest.c" |
I think i found solution. Tried to install nio4r via /Applications/Vagrant/embedded/bin/gem. Installing fine. |
|
I was experiencing same issue with |
Also second solution is clone plugin repo & do steps like this: $ bundle
$ bundle exec thor gem:build
$ vagrant plugin install --plugin-prerelease --plugin-source https://rubygems.org pkg/vagrant-berkshelf-1.4.0.dev.gem |
The problem is that the embedded Ruby in Vagrant doesn't have a matching arch config.h for x86_64 and the latest Darwin. I assume using sudo merely changes the environment sufficiently to find and use an appropriate config.h, not that its traditional utility re: authentication has anything to do with it. Given the now inaccurate title for this issue, perhaps re-titling it or opening a new one focusing on the root problem would be more likely to attract a solution? |
I was getting a similar error trying to install vagrant-chef-zero as a Vagrant plugin. /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in Thanks, the sudo/chown solve worked for me with vagrant-chef-zero as well for now until the bug is fixed. sudo vagrant plugin install vagrant-chef-zero && sudo chown -R "$USER":staff ~/.vagrant.d/* I am using OSX 10.8.5 |
merqlove's solution using sudo worked for me as well: vagrant 1.3.5 an interesting side-note. I was unable to install the vagrant-aws gem as well. After doing the sudo trick i was able to install the vagrant-aws gem normally. w00t. |
Hm, the problem seems to be that it needs some permissions in the Vagrant application folder. I'd prefer this not to be the case, so I wonder if there is a workaround that I can build into Vagrant itself. |
I have a similar problem with Vagrant's nio4r install.
Doing it manually requires sudo: But that hangs on
There is no OS X 10.9 None of the suggested solutions solutions in this thread have worked unfortunately. |
Managed to fix it locally. It's as @zepheiryan said, so replacing |
Berkshelf fixed this upstream |
Hi,
TL;DR The nio4r gem builds fine on my Ruby 1.9.3 but fails to build from Vagrant's Ruby interpreter.
There seems to be an issue with Xcode >=4.6.3 on Mountain Lion being unable to compile some gems with native code using the Vagrant >= 1.3.4 embedded Ruby, in this case nio4r.
This is a continuation of an issue started over on the vagrant-berkshelf repository.
berkshelf/vagrant-berkshelf#89
One other vagrant-berkshelf user, @zepheiryan dug into the issue a little deeper, from the thread on the vagrant-berkshelf issue.
I've also submitted an error directly on the nio4r (the gem throwing the exception) but since this was because Vagrant requires using a custom build of Ruby I'd also submit the issue here.
socketry/nio4r#35
Full output of the error trace below:
unknown28cfe9162235 :: ~/src/vgrnt ‹master*› % vagrant plugin install vagrant-berkshelf 1 ↵
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/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)
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
'--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Applications/Vagrant/embedded/bin/ruby
/Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:381:in
try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:455:in
block in try_link0'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/tmpdir.rb:83:in
mktmpdir' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:452:in
try_link0'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:476:in
try_link' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:619:in
try_func'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:894:in
block in have_func' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:790:in
block in checking_for'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in
block (2 levels) in postpone' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:in
open'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:284:in
block in postpone' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:254:in
open'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:280:in
postpone' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:789:in
checking_for'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/mkmf.rb:893:in
have_func' from extconf.rb:3:in
Gem files will remain installed in /Users/Michael/.vagrant.d/gems/gems/nio4r-0.5.0 for inspection.
'Results logged to /Users/Michael/.vagrant.d/gems/gems/nio4r-0.5.0/ext/nio4r/gem_make.out
from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in
block in build_extensions' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in
each'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in
build_extensions' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in
install'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in
block in install' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in
each'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in
each_with_index' from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in
install'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb:49:in
block in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/gem_helper.rb:42:in
block in with_environment'from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in
use_ui' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/gem_helper.rb:41:in
with_environment'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb:39:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in
call'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/bundler_check.rb:20:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in
call'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:116:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in
block in run'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in
busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in
run'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/base.rb:17:in
action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/install.rb:27:in
execute'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/root.rb:52:in
execute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/cli.rb:38:in
execute'from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:478:in
cli' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/bin/vagrant:96:in
<top (required)>'from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in
load' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in
The text was updated successfully, but these errors were encountered: