Vaprobash icon indicating copy to clipboard operation
Vaprobash copied to clipboard

ERROR: While executing gem ... (Errno::EACCES)

Open ghost opened this issue 10 years ago • 9 comments

I get this error while executing vagrant up following the install instruction from the documentation

`==> Vaprobash: >>> Start installing Ruby Gems ==> Vaprobash: ERROR: While executing gem ... (Errno::EACCES) ==> Vaprobash: Permission denied - /var/lib/gems The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell "latest" "sass" "compass"`

ghost avatar Mar 26 '15 15:03 ghost

Is this from installing rvm.sh shell script or something else that depending on Ruby?

fideloper avatar Mar 29 '15 19:03 fideloper

yes, here is the full log

==> Vaprobash: /tmp/vagrant-shell: line 48: /home/vagrant/.rvm/scripts/rvm: No such file or directory ==> Vaprobash: >>> Start installing Ruby Gems ==> Vaprobash: ERROR: While executing gem ... (Errno::EACCES) ==> Vaprobash: Permission denied - /var/lib/gems The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell "latest" "sass" "compass"

switching from 1.4.1 to master

ghost avatar Apr 01 '15 16:04 ghost

I got the same problem. Vagrant is running on Mac

 /tmp/vagrant-shell: line 48: /home/vagrant/.rvm/scripts/rvm: No such file or directory
==> Vaprobash: ERROR:  While executing gem ... (Errno::EACCES)
==> Vaprobash: Permission denied @ dir_s_mkdir - /var/lib/gems
The SSH command responded with a non-zero exit status.

FDiskas avatar Apr 13 '15 18:04 FDiskas

==> : >>> Start installing Ruby Gems
==> : Successfully installed sass-3.4.13
==> : Building native extensions.  This could take a while...
==> : ERROR:  Error installing compass:
==> :    ERROR: Failed to build gem native extension.
==> :
==> :         /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 /var/lib/gems/1.9.1/gems/ffi-1.9.8 for inspection.
==> : Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.8/ext/ffi_c/gem_make.out

vagrant

ruby_gems = [ # List any Ruby Gems that you want to install #"jekyll", "sass", "compass", "bootstrap-sass" ]

FDiskas avatar Apr 13 '15 22:04 FDiskas

I tried after installing the ruby

sudo apt-get install ruby-dev

this is for additional files to build executables. And its worked

FDiskas avatar Apr 13 '15 22:04 FDiskas

Same error but strangely enough only for Compass

thibmaek avatar Apr 21 '15 23:04 thibmaek

@fideloper @exuperok

I recently encountered this error and i have included that the entire RVM system install gets botched because I was trying to install a key behind my companies firewall. The command:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

Uses the port 11371 which is blocked by the firewall. What actually worked was using the recommended command to get this key:

command curl -sSL https://rvm.io/mpapis.asc | gpg --import -

then i could do:

\curl -sSL https://get.rvm.io | bash -s stable --ruby

After which I could get ruby > 2.0.

Is it possible if we could modify the Vaprobash scripts to support this command instead?

Thanks, Adam

cmosguy avatar May 12 '15 18:05 cmosguy

Gotcha - yeah that sounds like a good alternative.

On Tue, May 12, 2015 at 1:10 PM Adam Klein [email protected] wrote:

@fideloper https://github.com/fideloper @exuperok https://github.com/exuperok

I recently encountered this error and i have included that the entire RVM system install gets botched because I was trying to install a key behind my companies firewall. The command:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

Uses the port 11371 which is blocked by the firewall. What actually worked was using the recommended command to get this key:

command curl -sSL https://rvm.io/mpapis.asc | gpg --import -

then i could do:

\curl -sSL https://get.rvm.io | bash -s stable --ruby

After which I could get ruby > 2.0.

Is it possible if we could modify the Vaprobash scripts to support this command instead?

Thanks, Adam

— Reply to this email directly or view it on GitHub https://github.com/fideloper/Vaprobash/issues/458#issuecomment-101371349 .

fideloper avatar May 12 '15 18:05 fideloper

@cmosguy thanks for this, it worked for me!

ghost avatar May 14 '15 10:05 ghost