简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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