Skip to content
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

question cask: "Error: ERROR: Failed to build gem native extension." with "Permission denied - Makefile" #29404

Closed
cometsong opened this issue Jan 25, 2017 · 4 comments

Comments

@cometsong
Copy link

Description of issue

Ruby "Error: ERROR: Failed to build gem native extension." with "Permission denied - Makefile (Errno::EACCES)" error on installing or running brew cask. Where is it trying to create the Makefile

I did follow all the commands listed on the pre bug report page, even before I read that page. :)

Main question:

Is this cask related or some other ruby issue?
brew works perfectly fine on its own.
This behavior started a few days ago.
I upgraded OSX to Sierra a couple weeks ago.
I uninstalled and then re-installed homebrew completely yesterday.
Same behaviour as before.

Ideas on where to look next?

Output of `brew cask --verbose`
=> brew cask --verbose
Error: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
creating Makefile
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `initialize': Permission denied - Makefile (Errno::EACCES)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `create_makefile'
	from extconf.rb:24:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/msgpack-0.5.8 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/msgpack-0.5.8/gem_make.out
Output of `brew install caskroom/cask/brew-cask`
=> brew install caskroom/cask/brew-cask
==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 3645, done.
remote: Compressing objects: 100% (3631/3631), done.
remote: Total 3645 (delta 32), reused 287 (delta 10), pack-reused 0
Receiving objects: 100% (3645/3645), 1.21 MiB | 0 bytes/s, done.
Resolving deltas: 100% (32/32), done.
Tapped 0 formulae (3,649 files, 3.8M)
==> brew cask install caskroom/cask/brew-cask
Error: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
creating Makefile
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `initialize': Permission denied - Makefile (Errno::EACCES)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `create_makefile'
	from extconf.rb:24:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/msgpack-0.5.8 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/msgpack-0.5.8/gem_make.out
Output of `brew doctor`
=> brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Putting non-prefixed coreutils in your path can cause gmp builds to fail.
Output of `brew cask doctor`

Same as all brew cask with or without subcommands appended.

Extra Facts
=> brew --version
Homebrew 1.1.8-2562-g1f97e318
Homebrew/homebrew-core (git revision d52f; last commit 2017-01-25)
=> gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.3.0)
did_you_mean (1.1.0)
io-console (default: 0.4.6)
json (default: 2.0.2)
minitest (5.10.1)
msgpack (1.0.2)
neovim (0.3.1)
net-telnet (0.1.1)
openssl (default: 2.0.2)
power_assert (0.4.1)
psych (default: 2.2.2)
rake (12.0.0)
rdoc (default: 5.0.0)
test-unit (3.2.3)
xmlrpc (0.2.1)
@vitorgalvao
Copy link
Member

vitorgalvao commented Jan 25, 2017

brew install caskroom/cask/brew-cask

You’re not supposed to do that. That’s not how HBC is installed. It is automatically installed the first time you run any brew cask command. Uninstall that (shouldn’t work anyway, but just to be safe) and try again. Also, --verbose by itself does nothing and produces an error. Try something like brew cask info alfred.

@vitorgalvao vitorgalvao added the awaiting user reply Issue needs response from a user. label Jan 25, 2017
@cometsong
Copy link
Author

I did initially do this by using:

brew tap caskroom/cask
brew cask install [...]

The single line above I got from an SO answer.
The output of brew cask info alfred is identical to the above error.

=> brew cask info alfred
Error: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
creating Makefile
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `initialize': Permission denied - Makefile (Errno::EACCES)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:2125:in `create_makefile'
	from extconf.rb:24:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/msgpack-0.5.8 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/msgpack-0.5.8/gem_make.out

@vitorgalvao vitorgalvao added awaiting maintainer feedback Issue needs response from a maintainer. and removed awaiting user reply Issue needs response from a user. labels Jan 25, 2017
@commitay
Copy link
Contributor

@vitorgalvao Okay to close this?

@cometsong
Copy link
Author

Yeah I did complete overhaul and I still have no idea what caused this before. Close is good.

@commitay commitay removed the awaiting maintainer feedback Issue needs response from a maintainer. label Oct 10, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants