Failing to install CLI on Linux Mint

New Member
2 0 0

This is the error

a@virt:~$ sudo gem install shopify-cli
Building native extensions. This could take a while...
ERROR: Error installing shopify-cli:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.7.0/gems/nokogumbo-2.0.5/ext/nokogumbo
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20210713-4999-j4vubf.rb extconf.rb
checking for whether -I/var/lib/gems/2.7.0/gems/nokogiri-1.11.7-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:
/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:597:in `block in try_compile'
from /usr/lib/ruby/2.7.0/mkmf.rb:544:in `with_werror'
from /usr/lib/ruby/2.7.0/mkmf.rb:597:in `try_compile'
from /usr/lib/ruby/2.7.0/mkmf.rb:661:in `try_cflags'
from /usr/lib/ruby/2.7.0/mkmf.rb:667:in `block (2 levels) in append_cflags'
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:666:in `block in append_cflags'
from /usr/lib/ruby/2.7.0/mkmf.rb:665:in `each'
from /usr/lib/ruby/2.7.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:


extconf failed, exit code 1

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


and the mkmf.log contains



"x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.7.0 -I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/ruby2.7-3WGs5v/ruby2.7-2.7.2=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=c99 conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -lruby-2.7 -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */

Please help me install this tool On LinuxMint
P.S. the same happens on newest Ubuntu.

New Member
2 0 0

Just had to install make and gcc