Why am I getting an error when installing Shopify-CLI on Ubuntu 18?

i’m trying to install shopify-cli, but i get error every time, my ubuntu version is 18 for that i installed Brew, Ruby, Gems,

after that i try below link to install shopify-cli, Link

I Run Command : sudo apt install /home/magento/Downloads/shopify-cli-2.7.4.deb

and getting error like,

Preparing to unpack .../12-shopify-cli-2.7.4.deb ...
ERROR:  Error installing shopify-cli:
    There are no versions of theme-check (~> 1.9.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
    theme-check requires Ruby version >= 2.6. The current ruby version is 2.5.0.
dpkg: error processing archive /tmp/apt-dpkg-install-UNNTav/12-shopify-cli-2.7.4.deb (--unpack):
 new shopify-cli package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /tmp/apt-dpkg-install-UNNTav/12-shopify-cli-2.7.4.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
2 Likes

This might help…

https://tutorialmeta.com/question/coundnt-upgrade-ruby-to-install-shopify-client

once you have used the “rbenv method” you can then use “gem install shopify-cli”.

Am working through it myself at the moment, will reply again if I find further issues.

All things considered, you’re better off using Ubuntu 20.04, I just installed from scratch and followed the instructions here: https://shopify.dev/apps/tools/cli/installation using apt, without an issue.

Hope this helps.

I had the same error.
I used a solution with sudo apt install ruby-full found in the shopify-cli repository discussion: https://github.com/Shopify/shopify-cli/issues/753.
This solved that issue.