You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.
Installing nokogumbo 2.0.5 to pristine Alpine Linux fails.
On Debian
$ docker run --rm ruby:3.0.1 gem install nokogumbo -v 2.0.5
Successfully installed nokogiri-1.11.3-x86_64-linux
Building native extensions. This could take a while...
Successfully installed nokogumbo-2.0.5
2 gems installed
On Alpine
$ docker run --rm ruby:3.0.1-alpine gem install nokogumbo -v 2.0.5
Successfully installed nokogiri-1.11.3-x86_64-linux
Building native extensions. This could take a while...
ERROR: Error installing nokogumbo:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/nokogumbo-2.0.5/ext/nokogumbo
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r ./siteconf20210417-1-s4q1r0.rb extconf.rb
checking for whether -I/usr/local/bundle/gems/nokogiri-1.11.3-x86_64-linux/ext/nokogiri is accepted as CFLAGS... *** 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
--without-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=/usr/local/bin/$(RUBY_BASE_NAME)
--with-libxml2
--without-libxml2
/usr/local/lib/ruby/3.0.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/3.0.0/mkmf.rb:597:in `block in try_compile'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:544:in `with_werror'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:597:in `try_compile'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:661:in `try_cflags'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:667:in `block (2 levels) in append_cflags'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:971:in `block in checking_for'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:361:in `block in postpone'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:357:in `postpone'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:970:in `checking_for'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:666:in `block in append_cflags'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:665:in `each'
from /usr/local/lib/ruby/3.0.0/mkmf.rb:665:in `append_cflags'
from extconf.rb:76:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/bundle/extensions/x86_64-linux-musl/3.0.0/nokogumbo-2.0.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/bundle/gems/nokogumbo-2.0.5 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux-musl/3.0.0/nokogumbo-2.0.5/gem_make.out
Note
nokogiri can be installed even on Alpine Linux as follows:
👋 Thank you for opening this issue and asking this question.
It looks like you don't have a compiler toolchain installed. The version of Nokogiri you're successfully installing is a precompiled version which doesn't require a C compiler toolchain; if we try that again with --platform=ruby you'll see a similar error; or alternatively if you try to install a gem with even a simple C extension, you'll see similar errors (e.g, gem install bcrypt).
Oh, and one more note: we're in the process of merging Nokogumbo into Nokogiri, at which point we'll be able to provide precompiled gems for Nokogumbo functionality as well. Stay tuned by following sparklemotion/nokogiri#2204 !
Installing nokogumbo 2.0.5 to pristine Alpine Linux fails.
On Debian
On Alpine
Note
nokogiri can be installed even on Alpine Linux as follows:
The text was updated successfully, but these errors were encountered: