无法在 Windows 上安装 shopify-cli
Unable to install shopify-cli on Windows
我试图按照 this link 此处在我的 Windows 10 系统上安装 shopify-cli。
我通过 chocolatey 安装了 Ruby:
choco install ruby
然后我下载了压缩版的 rubygems 和 运行 通过命令安装:
ruby setup.rb
然后我尝试通过此命令安装 shopify 应用程序 CLI:
gem install shopify-cli
我最终遇到错误,错误要求我安装 MSYS2,我安装了。
然后我再次尝试安装 shopify-cli 但现在遇到了这个错误:
PS C:\WINDOWS\system32> gem install shopify-cli
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing shopify-cli:
ERROR: Failed to build gem native extension.
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1/ext/shopify-cli
C:/tools/ruby27/bin/ruby.exe -I C:/tools/ruby27/lib/ruby/site_ruby/2.7.0 -r ./siteconf20201009-14664-r6pzlb.rb extconf.rb
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1/ext/shopify-cli
make "DESTDIR=" clean
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1/ext/shopify-cli
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="
Gem files will remain installed in C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1 for inspection.
Results logged to C:/tools/ruby27/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/shopify-cli-1.3.1/gem_make.out
所以问题是我使用 Chocolatey 安装 Ruby 然后单独尝试安装 MSYS2。而是借助 this link, I simply navigated to the ruby devkit download site 并从那里下载。这确保了 MSYS2 也可以通过包安装。然后我还卸载了 ruby gems 并再次尝试 re-installing 并且效果很好。
安装 ruby-cli 的命令终于成功了:
gem install shopify-cli
Fetching shopify-cli-1.3.1.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
Successfully installed shopify-cli-1.3.1
Parsing documentation for shopify-cli-1.3.1
Installing ri documentation for shopify-cli-1.3.1
Done installing documentation for shopify-cli after 13 seconds
先安装 ruby-dev
或 ruby-devel
,然后使用
重试
sudo apt-get install /Downloads/shopify-cli-2.6.3.deb
这应该有效
我试图按照 this link 此处在我的 Windows 10 系统上安装 shopify-cli。
我通过 chocolatey 安装了 Ruby:
choco install ruby
然后我下载了压缩版的 rubygems 和 运行 通过命令安装:
ruby setup.rb
然后我尝试通过此命令安装 shopify 应用程序 CLI:
gem install shopify-cli
我最终遇到错误,错误要求我安装 MSYS2,我安装了。
然后我再次尝试安装 shopify-cli 但现在遇到了这个错误:
PS C:\WINDOWS\system32> gem install shopify-cli
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing shopify-cli:
ERROR: Failed to build gem native extension.
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1/ext/shopify-cli
C:/tools/ruby27/bin/ruby.exe -I C:/tools/ruby27/lib/ruby/site_ruby/2.7.0 -r ./siteconf20201009-14664-r6pzlb.rb extconf.rb
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1/ext/shopify-cli
make "DESTDIR=" clean
current directory: C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1/ext/shopify-cli
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="
Gem files will remain installed in C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/shopify-cli-1.3.1 for inspection.
Results logged to C:/tools/ruby27/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/shopify-cli-1.3.1/gem_make.out
所以问题是我使用 Chocolatey 安装 Ruby 然后单独尝试安装 MSYS2。而是借助 this link, I simply navigated to the ruby devkit download site 并从那里下载。这确保了 MSYS2 也可以通过包安装。然后我还卸载了 ruby gems 并再次尝试 re-installing 并且效果很好。
安装 ruby-cli 的命令终于成功了:
gem install shopify-cli
Fetching shopify-cli-1.3.1.gem
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
Successfully installed shopify-cli-1.3.1
Parsing documentation for shopify-cli-1.3.1
Installing ri documentation for shopify-cli-1.3.1
Done installing documentation for shopify-cli after 13 seconds
先安装 ruby-dev
或 ruby-devel
,然后使用
sudo apt-get install /Downloads/shopify-cli-2.6.3.deb
这应该有效