简体   繁体   English

无法在 Ubuntu 20.04 上安装 Shopify CLI

[英]Can't install Shopify CLI on Ubuntu 20.04

Greetings I have a problem during the installation of Shopify CLI on Ubuntu 20.04 and I don't know how to fix it, I have download .deb file from GitHub provided by Shopify to install Shopify CLI and when I try to install it I get this error问候 我在 Ubuntu 20.04 上安装 Shopify CLI 时遇到问题,我不知道如何修复它,我从 Shopify 提供的 GitHub 下载了 .deb 文件来安装 Shopify CLI,当我尝试安装它时,我得到了这个错误

root@cleverchoice:/home/stefan/Downloads# ls
    ngrok-stable-linux-amd64  shopify-cli-2.6.3.deb  zadatak-20210817T091652Z-001

root@cleverchoice:/home/stefan/Downloads# sudo apt-get install /home/stefan/Downloads/shopify-cli-2.6.3.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'shopify-cli' instead of '/home/stefan/Downloads/shopify-cli-2.6.3.deb'
The following NEW packages will be installed:
  shopify-cli
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/956 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /home/stefan/Downloads/shopify-cli-2.6.3.deb shopify-cli all 2.6.3 [956 B]
(Reading database ... 209097 files and directories currently installed.)
Preparing to unpack .../shopify-cli-2.6.3.deb ...
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/ffi-1.15.4/ext/ffi_c
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20211012-33803-1ymrqv7.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

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

I found the answer I didn't have installed Ruby on my Ubuntu 20.04我找到了答案我没有在我的 Ubuntu 20.04 上安装 Ruby

sudo apt update
sudo apt install ruby-full

ruby --version

sudo apt update
sudo apt install git curl autoconf bison build-essential \
    libssl-dev libyaml-dev libreadline6-dev zlib1g-dev \
    libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM