shopify-cli-2.1.0.deb => 新的 shopify-cli 包预安装脚本子进程返回错误退出状态 1

shopify-cli-2.1.0.deb => new shopify-cli package pre-installation script subprocess returned error exit status 1

我正在尝试安装 Shopify-cli-2.1.0.deb ,但我收到错误消息。 我已经执行了命令 sudo gem 更新 --system 3.1.3 sudo apt-get install -y ruby-dev

但是当我尝试使用以下命令安装 Shopify-cli-2.1.0.deb 时,我收到错误消息:

``
**sudo apt install /home/daviamaral/Downloads/shopify-cli-2.1.0.deb**

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.15.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.7.0/gems/ffi-1.15.3 for inspe
ction.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.15.3/g
em_make.out
dpkg: error processing archive /home/daviamaral/Downloads/shopify-cli-2.1.0.deb 
(--unpack):
 new shopify-cli package pre-installation script subprocess returned error exit 
status 1
Errors were encountered while processing:
 /home/daviamaral/Downloads/shopify-cli-2.1.0.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我要去 /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.15.3/mkmf.log

"pkg-config --exists libffi"
package configuration for libffi is not found
"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 -fdebug-prefix-map=/build/ruby2.7-2E2p8v/ruby2.7-2.7.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC 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 */


写完这个问题我静下心来,发现日志中显示了问题!

==> 找不到 libffi 的包配置

是的,对我来说,就是gcc环境,所以我试了 sudo apt-get 安装 gcc 这对我有用 ubuntu!

我会把这个问题留在这里,因为以后可能会成为其他人的问题!