Ask Your Question

Error when installing sass using "gem install sass"

asked 2017-08-25 04:52:07 -0600

shusil123 gravatar image

updated 2017-08-25 05:51:41 -0600

hhlp gravatar image

This is the output I get when trying to install sass with gem. I have ruby / rubygems installed. I've tried intalling make, ruby-devel and some other packages. Nothing resolved the issue. Any help?

Building native extensions. This could take a while... ERROR: Error installing sass: ERROR: Failed to build gem native extension.

    current directory: /usr/local/share/gems/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby -r ./siteconf20170825-13240-1f9wvqf.rb extconf.rb
checking for ffi.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:
/usr/share/ruby/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/share/ruby/mkmf.rb:588:in `try_cpp'
    from /usr/share/ruby/mkmf.rb:1095:in `block in have_header'
    from /usr/share/ruby/mkmf.rb:945:in `block in checking_for'
    from /usr/share/ruby/mkmf.rb:351:in `block (2 levels) in postpone'
    from /usr/share/ruby/mkmf.rb:321:in `open'
    from /usr/share/ruby/mkmf.rb:351:in `block in postpone'
    from /usr/share/ruby/mkmf.rb:321:in `open'
    from /usr/share/ruby/mkmf.rb:347:in `postpone'
    from /usr/share/ruby/mkmf.rb:944:in `checking_for'
    from /usr/share/ruby/mkmf.rb:1094:in `have_header'
    from extconf.rb:16:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:


extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/ffi-1.9.18 for inspection. Results logged to /usr/local/lib64/gems/ruby/ffi-1.9.18/gem_make.out

edit retag flag offensive close merge delete



there is no much information, to give a proper diagnostic of the issue, but looks like you are missing make, gcc and ruby-devel, also check if you have install libffi-devel

aeperezt gravatar imageaeperezt ( 2017-08-25 10:00:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-17 17:21:09 -0600

Not sure if this helps at all but ...

[thomas@fedorapc ~]$ sudo gem install sass --no-user-install
[sudo] password for thomas: 
Fetching: rb-fsevent-0.10.2.gem (100%)
Successfully installed rb-fsevent-0.10.2
Fetching: ffi-1.9.18.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.18
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.1.gem (100%)
Successfully installed sass-3.5.1
Parsing documentation for rb-fsevent-0.10.2
Installing ri documentation for rb-fsevent-0.10.2
Parsing documentation for ffi-1.9.18
Installing ri documentation for ffi-1.9.18
Parsing documentation for rb-inotify-0.9.10
Installing ri documentation for rb-inotify-0.9.10
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.5.1
Installing ri documentation for sass-3.5.1
Done installing documentation for rb-fsevent, ffi, rb-inotify, sass-listen, sass after 17 seconds
5 gems installed

this is on fedora 26 as well ...

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-08-25 04:52:07 -0600

Seen: 1,870 times

Last updated: Aug 25 '17