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

Failed to build gem native extension, using x86_64-darwin-20 extension #18

Open
hopewise opened this issue Jan 8, 2023 · 1 comment

Comments

@hopewise
Copy link

hopewise commented Jan 8, 2023

I am trying to install the gem using Mac Pro intel:

gem install http-parser -v '1.2.3' --source 'https://rubygems.org/' 

but I am getting error:

ERROR:  Error installing http-parser:
        ERROR: Failed to build gem native extension.

    current directory: /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/gems/http-parser-1.2.3/ext
/Users/user/.asdf/installs/ruby/2.3.0/bin/ruby -rubygems /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR=/Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-20/2.3.0-static/http-parser-1.2.3 RUBYLIBDIR=/Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-20/2.3.0-static/http-parser-1.2.3
/Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require': cannot load such file -- rake (LoadError)
        from /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/gems/rake-13.0.6/exe/rake:25:in `<main>'

rake failed, exit code 1

Gem files will remain installed in /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/gems/http-parser-1.2.3 for inspection.
Results logged to /Users/user/.asdf/installs/ruby/2.3.0/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-20/2.3.0-static/http-parser-1.2.3/gem_make.out

I tried to:

time bundle lock --add-platform x86_64-linux --add-platform ruby
bundle install

but that hasn't solved the issue

@hopewise hopewise changed the title Failed to build gem native extension Failed to build gem native extension, using x86_64-darwin-20 extension Jan 8, 2023
@StefanTheWiz
Copy link

see #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants