Ubuntu 16.04 builds failing with 'Error installing sass: Failed to build gem native extension.
geerlingguy opened this issue ยท 10 comments
Failed build: https://travis-ci.org/geerlingguy/ansible-role-ruby/jobs/338313098
"WARNING: You don't have /root/.gem/ruby/2.3.0/bin in your PATH,
gem executables will not run.
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.
current directory: /root/.gem/ruby/2.3.0/gems/ffi-1.9.21/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180207-1796-yci6zh.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/root/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.21/mkmf.log
current directory: /root/.gem/ruby/2.3.0/gems/ffi-1.9.21/ext/ffi_c
make \"DESTDIR=\" clean
current directory: /root/.gem/ruby/2.3.0/gems/ffi-1.9.21/ext/ffi_c
make \"DESTDIR=\"
Running autoreconf for libffi
/root/.gem/ruby/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: 2: exec: autoreconf: not found
libffi.mk:6: recipe for target '\"/root/.gem/ruby/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux-gnu\"/.libs/libffi_convenience.a' failed
make: *** [\"/root/.gem/ruby/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux-gnu\"/.libs/libffi_convenience.a] Error 127
make failed, exit code 2
Gem files will remain installed in /root/.gem/ruby/2.3.0/gems/ffi-1.9.21 for inspection.
Results logged to /root/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.21/gem_make.out
Looks like I need to install the following (via apt) to make things work:
- autogen
- autoconf
- libtool
It doesn't work on my computer.
Still following error:
Building native extensions. This could take a while...
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.23/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180504-13019-5fpjqy.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.23 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.23/gem_make.out
Worked for me:
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sass
Tks!
Worked for me as well with this:
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sass
this work.
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sass
sass -v :
Ruby Sass 3.5.7
joaomariowd's solution worked for me with an addition at the end...
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sass
sudo gem install listen
Worked for me:
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sassTks!
nice, thx~
apt-get install -y ruby-dev gcc make && \
gem install sass
This worked for me as well. Thank you so much!
sudo apt install ruby-full rubygems autogen autoconf libtool make
sudo gem install sass
For fedora:
sudo dnf install ruby-devel rubygems autogen autoconf libtool
gem install sass
i think ... can't remember exactly how i made it ... happened a few weeks ago