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
Installing the cfn-nag (v0.8.10) gem on alpine3.16.1 fails with the following error:
ERROR
Building native extensions. This could take a while...
ERROR: Error installing cfn-nag:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/psych-3.3.2/ext/psych
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.1.0 -r ./siteconf20220730-14-dy0ixb.rb extconf.rb
checking for yaml.h... *** 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-libyaml-dir
--without-libyaml-dir
--with-libyaml-include
--without-libyaml-include=${libyaml-dir}/include
--with-libyaml-lib
--without-libyaml-lib=${libyaml-dir}/lib
--enable-bundled-libyaml
--disable-bundled-libyaml
/usr/local/lib/ruby/3.1.0/mkmf.rb:498: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.1.0/mkmf.rb:624:in `block in try_compile'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:573:in `with_werror'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:624:in `try_compile'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:1213:in `block in find_header'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:1007:in `block in checking_for'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:362:in `block (2 levels) in postpone'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:332:in `open'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:362:in `block in postpone'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:332:in `open'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:358:in `postpone'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:1006:in `checking_for'
from /usr/local/lib/ruby/3.1.0/mkmf.rb:1212:in `find_header'
from extconf.rb:10: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.1.0/psych-3.3.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/bundle/gems/psych-3.3.2 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux-musl/3.1.0/psych-3.3.2/gem_make.out
Steps to reproduce
Dockerfile:
FROM docker.io/alpine:3.16.1
RUN apk add --no-cache ruby-dev=3.1.2-r0 &&\
gem install cfn-nag -v 0.8.10
Run docker build
The text was updated successfully, but these errors were encountered:
@Poweranimal @manuelnucci
I had the same problem. To solve it, I had to install 3 packages before the command "gem install cfn-nag"
Here is my Dockerfile from ruby 3.3 in Alpine 3.20. Try the apk add...
Hi,
Installing the cfn-nag (
v0.8.10
) gem onalpine3.16.1
fails with the following error:ERROR
Steps to reproduce
Dockerfile:
Run
docker build
The text was updated successfully, but these errors were encountered: