R
R
rund12020-09-05 20:09:29
ruby
rund1, 2020-09-05 20:09:29

How to install SASS on ubuntu 20.4 with ruby ​​--version ruby ​​2.7.0p0 already installed?

Greetings. I used this site as installation instructions: whiskeyman.ru/web-masteru/49-ustanovka-sass-na-ubu...
at point 2 for installing SASS itself

And install Sass itself: sudo gem install sass
the following error occurs in the console:
:~$ sudo gem install sass
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.7.0/gems/ffi-1.13.1/ext/ffi_c
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20200905-12869-qzh8vm.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:
  --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/bin/$(RUBY_BASE_NAME)2.7
  --with-ffi_c-dir
  --without-ffi_c-dir
  --with-ffi_c-include
  --without-ffi_c-include=${ffi_c-dir}/include
  --with-ffi_c-lib
  --without-ffi_c-lib=${ffi_c-dir}/lib
  --enable-system-libffi
  --disable-system-libffi
  --with-libffi-config
  --without-libffi-config
  --with-pkg-config
  --without-pkg-config
  --with-ffi-dir
  --without-ffi-dir
  --with-ffi-include
  --without-ffi-include=${ffi-dir}/include
  --with-ffi-lib
  --without-ffi-lib=${ffi-dir}/lib
/usr/lib/ruby/2.7.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/lib/ruby/2.7.0/mkmf.rb:613:in `try_cpp'
  from /usr/lib/ruby/2.7.0/mkmf.rb:1124:in `block in have_header'
  from /usr/lib/ruby/2.7.0/mkmf.rb:971:in `block in checking_for'
  from /usr/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
  from /usr/lib/ruby/2.7.0/mkmf.rb:331:in `open'
  from /usr/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
  from /usr/lib/ruby/2.7.0/mkmf.rb:331:in `open'
  from /usr/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
  from /usr/lib/ruby/2.7.0/mkmf.rb:970:in `checking_for'
  from /usr/lib/ruby/2.7.0/mkmf.rb:1123:in `have_header'
  from extconf.rb:10:in `system_libffi_usable?'
  from extconf.rb:42:in `<main>'

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

  /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.13.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.7.0/gems/ffi-1.13.1 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.13.1/gem_make.out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2020-09-05
@rund1

Until you have enough experience, install from the repo: sudo apt install ruby-sass(this is on Debian; Ubuntu may have the same or similar package).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question