如何在 LinuxMint 上安装 Shopify SDK

How to install Shopify SDK on LinuxMint

我正在尝试这个安装说明 enter link description here 我 运行 Linux 安装并遇到一些问题。

在新终端 window 中,导航到您的主目录并 运行 以下命令:

  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:
--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-libxml2
--without-libxml2
/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:

/var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/nokogumbo-2.0.5/mkmf.log

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

并且 mkmf.log 包含

"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"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */

请教如何在 LinuxMint 上安装此工具 P.S。同样的情况发生在最新的 Ubuntu.

我只需要安装 make 和 gcc。和所有的工作