服务器端JavaScript – 永夜 https://www.shuijingwanwq.com 没有不值得去解决的问题,也没有不值得去学习的技术! Thu, 21 May 2026 11:15:07 +0000 zh-Hans hourly 1 https://wordpress.org/?v=7.0 npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。 https://www.shuijingwanwq.com/2025/03/05/8920/ https://www.shuijingwanwq.com/2025/03/05/8920/#respond Wed, 05 Mar 2025 01:27:33 +0000 https://www.shuijingwanwq.com/?p=8920 浏览量: 128 1、npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。


PS C:\wwwroot\phpMyAdmin> npm -v
npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ npm -v
+ ~~~
    + CategoryInfo          : SecurityError: (:) [],PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess


2、确定文件 C:\Program Files\nodejs\npm.ps1 是存在的。如图1
确定文件 C:\Program Files\nodejs\npm.ps1 是存在的

图1

3、输入以下命令之一来更改执行策略,永久更改(对所有会话有效)。如图2
输入以下命令之一来更改执行策略,永久更改(对所有会话有效)

图2



PS C:\wwwroot\phpMyAdmin> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
PS C:\wwwroot\phpMyAdmin> npm -v
10.9.2
PS C:\wwwroot\phpMyAdmin>


]]>
https://www.shuijingwanwq.com/2025/03/05/8920/feed/ 0
执行:shopify version 时,提示:Version 3.49.7 available!,但是执行:shopify upgrade 成功后,仍然提示:Version 3.49.7 available! https://www.shuijingwanwq.com/2023/11/29/8249/ https://www.shuijingwanwq.com/2023/11/29/8249/#respond Wed, 29 Nov 2023 01:49:43 +0000 https://www.shuijingwanwq.com/?p=8249 浏览量: 63

1、执行:shopify version 时,提示:Version 3.49.7 available!。

PS E:\wwwroot\shopify-theme\theme-20230922> shopify version
Current Shopify CLI version: 3.49.3
💡 Version 3.49.7 available!

2、执行:shopify upgrade 成功(提示:Success! Upgraded Shopify CLI to version 3.49.7.)后,查看版本信息,仍然提示:Version 3.49.7 available!。如图1

执行:shopify upgrade 成功(提示:Success! Upgraded Shopify CLI to version 3.49.7.)后,查看版本信息,仍然提示:Version 3.49.7 available!

图1

PS E:\wwwroot\shopify-theme\theme-20230922> shopify upgrade
Upgrading CLI from 3.49.3 to 3.49.7...
Attempting to upgrade via npm install -g @shopify/cli@latest @shopify/theme@latest...

changed 911 packages in 3m

119 packages are looking for funding
  run `npm fund` for details
✅ Success! Upgraded Shopify CLI to version 3.49.7.
PS E:\wwwroot\shopify-theme\theme-20230922> shopify version
Current Shopify CLI version: 3.49.3
💡 Version 3.49.7 available!
PS E:\wwwroot\shopify-theme\theme-20230922>

3、决定将 npm install -g 替换为 yarn global add,执行:yarn global add @shopify/cli @shopify/theme。执行成功后,查看版本信息:Current Shopify CLI version: 3.49.7。符合预期。如图2

决定将 npm install -g 替换为 yarn global add,执行:yarn global add @shopify/cli @shopify/theme。执行成功后,查看版本信息:Current Shopify CLI version: 3.49.7。符合预期

图2

PS E:\wwwroot\shopify-theme\theme-20230922> yarn global add @shopify/cli @shopify/theme
yarn global v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "typescript@>=2.7".
warning "@shopify/cli > zod-to-json-schema@3.21.4" has unmet peer dependency "zod@^3.21.4".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.22.19", while you're on "1.22.15".
success Installed "@shopify/cli@3.49.7" with binaries:
      - shopify
warning "@shopify/theme@3.49.7" has no binaries
Done in 27.75s.
PS E:\wwwroot\shopify-theme\theme-20230922> shopify version
Current Shopify CLI version: 3.49.7
]]>
https://www.shuijingwanwq.com/2023/11/29/8249/feed/ 0
在 Windows 10 中安装 HTTP Toolkit 后对 Shopify CLI 3.x 的抓包流程 https://www.shuijingwanwq.com/2023/11/27/8240/ https://www.shuijingwanwq.com/2023/11/27/8240/#comments Mon, 27 Nov 2023 02:21:15 +0000 https://www.shuijingwanwq.com/?p=8240 浏览量: 110 1、参考:在 Windows 10 中安装 Fiddler Classic 后对 Shopify CLI 3.x 的抓包流程 。 最终未实现。 2、参考:如果您只是为 Node.js 寻找一个类似 fiddler 的 HTTP 调试工具,一个名为 HTTP Toolkit 的开源项目,一键从应用程序打开终端。从该终端启动任何节点 CLI/服务器/脚本。它发送的所有 HTTP 或 HTTPS 请求都会自动代理,因此您可以查看和重写所有内容。无需更改代码或 npm 包。在内部,它的工作方式是将额外的 JS 脚本注入到启动的 Node 进程中,该脚本挂钩 require() 来自动为您重新配置代理设置,对于每个不使用全局设置的模块。 3、HTTP Toolkit 允许您拦截来自几乎所有 HTTP 客户端的 HTTP 和 HTTPS 流量。参考: Intercepting HTTP from Node.js 。HTTP Toolkit 还允许您拦截服务器、脚本和命令行工具,例如 Node.js 应用程序。 4、点击 Fresh Terminal。打开一个新终端,拦截所有进程和 Docker 容器。如图1
点击 Fresh Terminal。打开一个新终端,拦截所有进程和 Docker 容器

图1

5、在新的终端中执行 Shopify CLI 的命令。如图2
在新的终端中执行 Shopify CLI 的命令

图2



E:\wwwroot\shopify-theme\theme-20230922>shopify theme list --verbose
2023-10-13T07:29:32.038Z: Running command theme list
2023-10-13T07:29:32.070Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2023-10-13T07:29:32.071Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store shuijingwanwq-development.myshopify.com:
[]

2023-10-13T07:29:32.075Z: Getting session store...
2023-10-13T07:29:32.080Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "shuijingwanwq-development.myshopify.com"
  }
}

2023-10-13T07:29:32.084Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-10-13T07:29:32.097Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.49.3
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: win32
 - Content-Type: application/json

2023-10-13T07:29:33.344Z: Request to https://accounts.shopify.com/oauth/introspection completed in 1228 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"8d18a213b90c24fcf92bf986617a68cd"
 - x-request-id: 7044c640-8cc3-41a0-8c0f-d7ee387b56a5

2023-10-13T07:29:33.352Z: The identity token is valid: true
2023-10-13T07:29:33.354Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2023-10-13T07:29:34.817Z: Request to https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing completed in 1451 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - x-request-id: d6e39648-7db9-48d4-881e-c523188e9a83

2023-10-13T07:29:34.821Z: Getting development theme...
2023-10-13T07:29:34.824Z: Getting host theme...
name                                             role                   id
───────────────────────────────────────────────  ─────────────────────  ─────────────
Dawn 的更新版副本                                      [live]                 #133644189881
Dawn                                             [unpublished]          #130440429753
Sense                                            [unpublished]          #130698641593
Crave 重命名                                        [unpublished]          #130935947449
Refresh                                          [unpublished]          #131376218297
Colorblock                                       [unpublished]          #131376251065
Dawn Customize                                   [unpublished]          #130580054201
Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本            [unpublished]          #132350771385
的更新版副本
shopify-theme-dawn-20221011/main                 [unpublished]          #133060722873
Dawn                                             [unpublished]          #133474844857
Copy of Studio                                   [unpublished]          #133474975929
Dawn (Shopify CLI) 9                             [unpublished]          #133492932793
Dawn 的副本 的副本 1                                   [unpublished]          #133635932345
Colorblock                                       [unpublished]          #130698510521
Taste                                            [unpublished]          #130698543289
Craft                                            [unpublished]          #130698576057
Development (639b5c-DESKTOP-QLPK8QM)             [development] [yours]  #134109462713
2023-10-13T07:29:35.161Z:
Running system process:
  · Command: ruby -v
  · Working directory: E:/wwwroot/shopify-theme/theme-20230922

2023-10-13T07:29:36.486Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 1275 ms
With response headers:
 - x-request-id: 56128223-93f8-45c2-bb4e-f5c7abb44863

2023-10-13T07:29:36.488Z: Analytics event sent: {
  "command": "theme list",
  "time_start": 1697182172041,
  "time_end": 1697182175101,
  "total_time": 3060,
  "success": true,
  "cli_version": "3.49.3",
  "ruby_version": "3.1.1",
  "node_version": "18.18.0",
  "is_employee": false,
  "uname": "windows amd64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "env_shell": "cmd.exe",
  "env_device_id": "eb479d42673daf065d783e808d3de3b4870a4c02",
  "env_cloud": "localhost",
  "env_package_manager": "unknown",
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "theme",
  "cmd_all_plugin": "@shopify/theme",
  "cmd_all_verbose": true,
  "cmd_all_path_override": false,
  "args": "--verbose",
  "env_plugin_installed_all": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2023-10-13T07:29:36.499Z: Completed command theme list

E:\wwwroot\shopify-theme\theme-20230922>



6、在 HTTP Toolkit 中查看已经被捕获的流量,符合期望。已经存在对应的请求:https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing ,且响应为明文。如图3
在 HTTP Toolkit 中查看已经被捕获的流量,符合期望。已经存在对应的请求:https://shuijingwanwq-development.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing ,且响应为明文

图3

7、现有终端,点击 Existing Terminal,在本机上的任何 Powershell 终端中运行以下命令,以立即启用对在那里启动的所有新进程的拦截。如图4
现有终端,点击 Existing Terminal,在本机上的任何 Powershell 终端中运行以下命令,以立即启用对在那里启动的所有新进程的拦截

图4

8、在现有终端中执行 Shopify CLI 的命令。在 HTTP Toolkit 中查看已经被捕获的流量,符合期望。如图5
在现有终端中执行 Shopify CLI 的命令。在 HTTP Toolkit 中查看已经被捕获的流量,符合期望

图5



PS C:\Users\Lenovo> Invoke-Expression (Invoke-WebRequest http://localhost:8001/ps-setup).Content                                                                           HTTP Toolkit interception enabled
PS C:\Users\Lenovo> E:
PS E:\> cd .\wwwroot\shopify-theme\theme-20230922\
PS E:\wwwroot\shopify-theme\theme-20230922> shopify theme list
name                                             role           id
───────────────────────────────────────────────  ─────────────  ─────────────
Dawn 的更新版副本                                      [live]         #133644189881
Dawn                                             [unpublished]  #130440429753
Sense                                            [unpublished]  #130698641593
Crave 重命名                                        [unpublished]  #130935947449
Refresh                                          [unpublished]  #131376218297
Colorblock                                       [unpublished]  #131376251065
Dawn Customize                                   [unpublished]  #130580054201
Taste 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本 的更新版副本  [unpublished]  #132350771385
shopify-theme-dawn-20221011/main                 [unpublished]  #133060722873
Dawn                                             [unpublished]  #133474844857
Copy of Studio                                   [unpublished]  #133474975929
Dawn (Shopify CLI) 9                             [unpublished]  #133492932793
Dawn 的副本 的副本 1                                   [unpublished]  #133635932345
Colorblock                                       [unpublished]  #130698510521
Taste                                            [unpublished]  #130698543289
Craft                                            [unpublished]  #130698576057
PS E:\wwwroot\shopify-theme\theme-20230922>


]]>
https://www.shuijingwanwq.com/2023/11/27/8240/feed/ 1
执行 yarn 命令时,报错:The engine “node” is incompatible with this module. https://www.shuijingwanwq.com/2023/11/02/8164/ https://www.shuijingwanwq.com/2023/11/02/8164/#respond Thu, 02 Nov 2023 01:54:46 +0000 https://www.shuijingwanwq.com/?p=8164 浏览量: 150 1、执行 yarn 命令时,报错:The engine “node” is incompatible with this module.Expected version “^14.18.0 || ^16.14.0 || >=18.0.0”. Got “16.13.1”。如图1
执行 yarn 命令时,报错:The engine "node" is incompatible with this module.Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "16.13.1"

图1



PS E:\wwwroot\shopify-app>yarn create @shopify/app
yarn create v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
error execa@7.2.0: The engine "node" is incompatible with this module. Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "16.13.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.


2、^16.14.0相当于>=16.14.0,<16.15,决定重新安装 Node.js 的 16 的最新版本。打开网址:https://nodejs.org/dist/latest-v16.x/ 计划下载 node-v16.20.2-x64.msi 。但是,发现其不符合版本依赖的要求。如图2
^16.14.0相当于>=16.14.0,<16.15,决定重新安装 Node.js 的 16 的最新版本。打开网址:https://nodejs.org/dist/latest-v16.x/ 计划下载 node-v16.20.2-x64.msi 。但是,发现其不符合版本依赖的要求

图2

  3、>=18.0.0 也是可行的,最张决定下载 18 的最新版本。下载 node-v18.18.0-x64.msi。再次执行 yarn 命令时,不再报错。如图3
>=18.0.0 也是可行的,最张决定下载 18 的最新版本。下载 node-v18.18.0-x64.msi。再次执行 yarn 命令时,不再报错

图3



PS E:\wwwroot\shopify-app> node -v
v18.18.0
PS E:\wwwroot\shopify-app> yarn create @shopify/app
yarn create v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
warning "@shopify/create-app > @oclif/core > ts-node@10.9.1" has unmet peer dependency "typescript@>=2.7".
[4/4] Building fresh packages...
success Installed "@shopify/create-app@3.49.3" with binaries:
      - create-app

Welcome. Let’s get started by naming your app project. You can change it later.

?  Your project name?
>  fruitful-shareholder-app
   ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


]]>
https://www.shuijingwanwq.com/2023/11/02/8164/feed/ 0
部署 Shopify PHP 应用至生产环境(阿里云、ECS 中的 CentOS 7.7 64位、MySQL 5.7) https://www.shuijingwanwq.com/2023/07/13/7855/ https://www.shuijingwanwq.com/2023/07/13/7855/#comments Thu, 13 Jul 2023 03:06:29 +0000 https://www.shuijingwanwq.com/?p=7855 浏览量: 326

1、现有一个 Shopify PHP 应用,已经可在开发环境中预览。如图1

现有一个 Shopify PHP 应用,已经可在开发环境中预览

图1

2、现准备将其部署至生产环境。如果需要部署应用至生产环境,Shopify 建议创建一个单独的应用。此应用与开发、测试环境共用代码库,但是在 Shopify 合作伙伴中心有自己的记录和配置。以避免在开发和测试过程中影响到生产环境的应用。使用 Shopify 合作伙伴
从头开始创建应用:learn-php-app-0605-prod。如图2

使用 Shopify 合作伙伴从头开始创建应用:learn-php-app-0605-prod

图2

3、检索环境变量,以便可以在稍后的步骤中设置它们。记下 SCOPES、SHOPIFY_API_KEY 和 SHOPIFY_API_SECRET 值。 您需要将这些值设置为托管应用程序的环境变量。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605$ npm run shopify app env show

> learn-php-app-ubuntu-2004-0605@1.0.0 shopify
> shopify app env show

?  Which existing app is this for?
&#x2714;  learn-php-app-0605-prod


    SHOPIFY_API_KEY=c7f826670575f7ae069f7e56350465ef
    SHOPIFY_API_SECRET=4de64aa8281e97055cf7698bbe56039e
    SCOPES=write_products



4、参考:基于阿里云的 ECS、RDS,将个人博客迁移升级至:Docker(基于预算考虑,最终未实现)、LNMP(CentOS 7.7、Nginx 1.16、MySQL 5.7、PHP 7.4)、HTTPS 的过程  ,之前的环境是基于 OneinStack 的自动安装。PHP 版本 7.4 已经不再符合 Shopify 应用的运行条件。需要升级至 8.1 版本,尽量与本地环境保持一致。


[root@iZ23wv7v5ggZ ~]# php -v
PHP 7.4.0 (cli) (built: Dec  5 2019 11:56:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies




wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605$ php -v
PHP 8.1.18 (cli) (built: Apr 14 2023 04:39:24) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.18, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.18, Copyright (c), by Zend Technologies


5、参考:在 阿里云中的 CentOS 7.7 中卸载 PHP 7.4,然后安装 PHP 8

6、查看阿里云中的 ECS 的 Alibaba Cloud Linux 3 的 PHP 版本


[root@iZ23wv7v5ggZ ~]# php -v
PHP 8.1.19 (cli) (built: Jun  7 2023 11:34:24) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.19, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.19, Copyright (c), by Zend Technologies
[root@iZ23wv7v5ggZ ~]#



7、添加虚拟主机时,设置 SSL 证书失败:Let’s Encrypt Verify error! DNS problem,需要先设置域名的解析。


[root@iZ23wv7v5ggZ www.shuijingwanwq.com]# ~/oneinstack/vhost.sh

#######################################################################
#       OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################

What Are You Doing?
        1. Use HTTP Only
        2. Use your own SSL Certificate and Key
        3. Use Let's Encrypt to Create SSL Certificate and Key
        q. Exit
Please input the correct option: 3

Please input domain(example: www.example.com): learn-php-app-0605-prod.shuijingwanwq.com
domain=learn-php-app-0605-prod.shuijingwanwq.com

Please input the directory for the domain:learn-php-app-0605-prod.shuijingwanwq.com :
(Default directory: /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com):
Virtual Host Directory=/data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com

Create Virtul Host directory......
set permissions of Virtual Host directory......

Do you want to add more domain name? [y/n]: n

Do you want to redirect all HTTP requests to HTTPS? [y/n]: y

Please select domain cert key length.
Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert.
Enter one of ec-256, ec-384, ec-521 will issue a ECC cert.

Please enter your cert key length (default 2048):

Let's Encrypt Verify error! DNS problem: NXDOMAIN looking up A for learn-php-app-0605-prod.shuijingwanwq.com
[Wed Jun  7 04:44:59 PM CST 2023] Using CA: https://acme.zerossl.com/v2/DV90
[Wed Jun  7 04:44:59 PM CST 2023] Creating domain key
[Wed Jun  7 04:44:59 PM CST 2023] The domain key is here: /root/.acme.sh/learn-php-app-0605-prod.shuijingwanwq.com/learn-php-app-0605-prod.shuijingwanwq.com.key
[Wed Jun  7 04:44:59 PM CST 2023] Single domain='learn-php-app-0605-prod.shuijingwanwq.com'
[Wed Jun  7 04:44:59 PM CST 2023] Getting domain auth token for each domain
[Wed Jun  7 04:45:05 PM CST 2023] Getting webroot for domain='learn-php-app-0605-prod.shuijingwanwq.com'
[Wed Jun  7 04:45:05 PM CST 2023] Verifying: learn-php-app-0605-prod.shuijingwanwq.com
[Wed Jun  7 04:45:07 PM CST 2023] Processing, The CA is processing your order, please just wait. (1/30)
[Wed Jun  7 04:45:11 PM CST 2023] learn-php-app-0605-prod.shuijingwanwq.com:Verify error:"error":{
[Wed Jun  7 04:45:11 PM CST 2023] Please add '--debug' or '--log' to check more details.
[Wed Jun  7 04:45:11 PM CST 2023] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
Error: Create Let's Encrypt SSL Certificate failed!
[root@iZ23wv7v5ggZ www.shuijingwanwq.com]#



8、在阿里云 云解析DNS 中添加记录。如图3

在阿里云 云解析DNS 中添加记录

图3

9、再次添加虚拟主机


[root@iZ23wv7v5ggZ www.shuijingwanwq.com]# ~/oneinstack/vhost.sh

#######################################################################
#       OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################

What Are You Doing?
        1. Use HTTP Only
        2. Use your own SSL Certificate and Key
        3. Use Let's Encrypt to Create SSL Certificate and Key
        q. Exit
Please input the correct option: 3

Please input domain(example: www.example.com): learn-php-app-0605-prod.shuijingwanwq.com
domain=learn-php-app-0605-prod.shuijingwanwq.com

Please input the directory for the domain:learn-php-app-0605-prod.shuijingwanwq.com :
(Default directory: /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com):
Virtual Host Directory=/data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com

Create Virtul Host directory......
set permissions of Virtual Host directory......

Do you want to add more domain name? [y/n]: n

Do you want to redirect all HTTP requests to HTTPS? [y/n]: y

Please select domain cert key length.
Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert.
Enter one of ec-256, ec-384, ec-521 will issue a ECC cert.

Please enter your cert key length (default 2048):
[Wed Jun  7 04:51:49 PM CST 2023] Using CA: https://acme.zerossl.com/v2/DV90
[Wed Jun  7 04:51:49 PM CST 2023] Single domain='learn-php-app-0605-prod.shuijingwanwq.com'
[Wed Jun  7 04:51:49 PM CST 2023] Getting domain auth token for each domain
[Wed Jun  7 04:51:54 PM CST 2023] Getting webroot for domain='learn-php-app-0605-prod.shuijingwanwq.com'
[Wed Jun  7 04:51:54 PM CST 2023] Verifying: learn-php-app-0605-prod.shuijingwanwq.com
[Wed Jun  7 04:51:55 PM CST 2023] Processing, The CA is processing your order, please just wait. (1/30)
[Wed Jun  7 04:52:01 PM CST 2023] Success
[Wed Jun  7 04:52:01 PM CST 2023] Verify finished, start to sign.
[Wed Jun  7 04:52:01 PM CST 2023] Lets finalize the order.
[Wed Jun  7 04:52:01 PM CST 2023] Le_OrderFinalize='https://acme.zerossl.com/v2/DV90/order/CLf6pxWJkdxtQylgNxS_Jg/finalize'
[Wed Jun  7 04:52:02 PM CST 2023] Order status is processing, lets sleep and retry.
[Wed Jun  7 04:52:02 PM CST 2023] Retry after: 15
[Wed Jun  7 04:52:18 PM CST 2023] Polling order status: https://acme.zerossl.com/v2/DV90/order/CLf6pxWJkdxtQylgNxS_Jg
[Wed Jun  7 04:52:20 PM CST 2023] Downloading cert.
[Wed Jun  7 04:52:20 PM CST 2023] Le_LinkCert='https://acme.zerossl.com/v2/DV90/cert/B2uRnJRfyVAP2B9aqQ2_Lw'
[Wed Jun  7 04:52:22 PM CST 2023] Cert success.
-----BEGIN CERTIFICATE-----
*******************
-----END CERTIFICATE-----
[Wed Jun  7 04:52:22 PM CST 2023] Your cert is in: /root/.acme.sh/learn-php-app-0605-prod.shuijingwanwq.com/learn-php-app-0605-prod.shuijingwanwq.com.cer
[Wed Jun  7 04:52:22 PM CST 2023] Your cert key is in: /root/.acme.sh/learn-php-app-0605-prod.shuijingwanwq.com/learn-php-app-0605-prod.shuijingwanwq.com.key
[Wed Jun  7 04:52:22 PM CST 2023] The intermediate CA cert is in: /root/.acme.sh/learn-php-app-0605-prod.shuijingwanwq.com/ca.cer
[Wed Jun  7 04:52:22 PM CST 2023] And the full chain certs is there: /root/.acme.sh/learn-php-app-0605-prod.shuijingwanwq.com/fullchain.cer

Do you want to add hotlink protection? [y/n]: y

Allow Rewrite rule? [y/n]: y

Please input the rewrite of programme :
wordpress,opencart,magento2,drupal,joomla,codeigniter,laravel
thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud,zblog,whmcs rewrite was exist.
(Default rewrite: other): laravel
You choose rewrite=laravel

Allow Nginx/Tengine/OpenResty access_log? [y/n]: y
You access log file=/data/wwwlogs/learn-php-app-0605-prod.shuijingwanwq.com_nginx.log

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Reload Nginx......

#######################################################################
#       OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################
Your domain:                  learn-php-app-0605-prod.shuijingwanwq.com
Virtualhost conf:             /usr/local/nginx/conf/vhost/learn-php-app-0605-prod.shuijingwanwq.com.conf
Directory of:                 /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com
Rewrite rule:                 /usr/local/nginx/conf/rewrite/laravel.conf
Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/learn-php-app-0605-prod.shuijingwanwq.com.crt
SSL Private Key:              /usr/local/nginx/conf/ssl/learn-php-app-0605-prod.shuijingwanwq.com.key
[root@iZ23wv7v5ggZ www.shuijingwanwq.com]#



10、添加FTP账号


[root@iZ23wv7v5ggZ www.shuijingwanwq.com]# ~/oneinstack/pureftpd_vhost.sh

#######################################################################
#       OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+      #
#                 FTP virtual user account management                 #
#       For more information please visit https://oneinstack.com      #
#######################################################################

What Are You Doing?
        1. UserAdd
        2. UserMod
        3. UserPasswd
        4. UserDel
        5. ListAllUser
        6. ShowUser
        q. Exit
Please input the correct option: 1

Please input a username: learn-php-app-0605-prod.shuijingwanwq.com

Please input the password: XZzqpC4k3Clf6Oup26e

Please input the directory(Default directory: /data/wwwroot): /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com
Password:
Enter it again:
#####################################

[learn-php-app-0605-prod.shuijingwanwq.com] create successful!

You user name is : learn-php-app-0605-prod.shuijingwanwq.com
You Password is : ************
You directory is : /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com



11、此时,需要在本地环境中构建生产环境中的应用,避免在生产环境中构建,因为生产环境中暂不支持构建所需要的前提条件,比如说 npm、composer 等。SHOPIFY_API_KEY 需要使用 步骤 3 中检索出的变量值。复制应用目录 learn-php-app-ubuntu-2004-0605/web 为 learn-php-app-0605-prod。目录 learn-php-app-0605-prod 仅需要构建后,上传至生产环境,因此,开发环境的依赖文件皆不需要。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ cd learn-php-app-0605-prod/
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ ls -l
total 300
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:38 app
-rwxrwxrwx 1 wangqiang wangqiang   1690 Jun  5 15:02 artisan
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:38 bootstrap
-rwxrwxrwx 1 wangqiang wangqiang   2238 Jun  5 15:02 composer.json
-rwxrwxrwx 1 wangqiang wangqiang 304694 Jun  6 09:35 composer.lock
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:38 config
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:38 database
-rwxrwxrwx 1 wangqiang wangqiang    450 Jun  5 15:02 entrypoint.sh
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:39 frontend
-rwxrwxrwx 1 wangqiang wangqiang    860 Jun  5 15:00 nginx.conf
-rwxrwxrwx 1 wangqiang wangqiang   1202 Jun  5 15:00 phpunit.xml
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:39 public
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:39 resources
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:39 routes
-rwxrwxrwx 1 wangqiang wangqiang    563 Jun  5 15:00 server.php
-rwxrwxrwx 1 wangqiang wangqiang     75 Jun  5 15:00 shopify.web.toml
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:39 storage
drwxrwxrwx 1 wangqiang wangqiang   4096 Jun  7 17:42 vendor



12、编辑 .env ,设置为生产环境中的配置值


APP_NAME="Shopify PHP App 0605 Prod"
APP_ENV=production
APP_KEY=***********
APP_DEBUG=false

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=************
DB_PORT=3306
DB_DATABASE=learn_php_app_0605_prod
DB_USERNAME=learn_php_app_0605_prod
DB_PASSWORD=**********



13、构建前端与后端,报错:/bin/sh: 1: vite: not found,需要先执行:npm install 。如图4

构建前端与后端,报错:/bin/sh: 1: vite: not found,需要先执行:npm install

图4


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod/frontend$ SHOPIFY_API_KEY=c7f826670575f7ae069f7e56350465ef yarn build
yarn run v1.22.15
$ vite build
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod/frontend$ npm install
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.

added 354 packages, and audited 360 packages in 3m

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod/frontend$ SHOPIFY_API_KEY=c7f826670575f7ae069f7e56350465ef npm run build

> shopify-frontend-template-react@1.0.0 build
> vite build

vite v4.3.9 building for production...
✓ 1966 modules transformed.
dist/assets/empty-state-8039a1e1.svg      0.26 kB │ gzip:   0.20 kB
dist/index.html                           0.48 kB │ gzip:   0.33 kB
dist/assets/home-trophy-d70b3542.png     20.65 kB
dist/assets/index-37530742.css          371.48 kB │ gzip:  45.42 kB
dist/assets/ko-ef9a93f5.js                0.21 kB │ gzip:   0.15 kB
dist/assets/ja-abb1af27.js                0.21 kB │ gzip:   0.15 kB
dist/assets/zh-4775ba45.js                0.21 kB │ gzip:   0.15 kB
dist/assets/th-32f01d1c.js                0.21 kB │ gzip:   0.15 kB
dist/assets/vi-72f55a87.js                0.23 kB │ gzip:   0.17 kB
dist/assets/nb-79727cd5.js                0.24 kB │ gzip:   0.17 kB
dist/assets/tr-d5c962f0.js                0.24 kB │ gzip:   0.17 kB
dist/assets/nl-ed6c02b1.js                0.28 kB │ gzip:   0.20 kB
dist/assets/de-5d4a5256.js                0.28 kB │ gzip:   0.20 kB
dist/assets/fi-e67a7779.js                0.28 kB │ gzip:   0.20 kB
dist/assets/da-9b835bb8.js                0.31 kB │ gzip:   0.22 kB
dist/assets/cs-d855408e.js                0.32 kB │ gzip:   0.23 kB
dist/assets/sv-8ac62b51.js                0.37 kB │ gzip:   0.25 kB
dist/assets/en-d265ad8d.js                0.41 kB │ gzip:   0.26 kB
dist/assets/es-fd2f35f4.js                0.41 kB │ gzip:   0.29 kB
dist/assets/pt-227fd344.js                0.41 kB │ gzip:   0.29 kB
dist/assets/pt-PT-a0c51464.js             0.41 kB │ gzip:   0.29 kB
dist/assets/pl-ab15c7ea.js                0.42 kB │ gzip:   0.29 kB
dist/assets/fr-23e50d95.js                0.43 kB │ gzip:   0.29 kB
dist/assets/it-08f76780.js                0.45 kB │ gzip:   0.30 kB
dist/assets/en-df34a502.js                1.53 kB │ gzip:   0.77 kB
dist/assets/de-2ae5c9fa.js                1.72 kB │ gzip:   0.90 kB
dist/assets/fr-5253333d.js                1.83 kB │ gzip:   0.94 kB
dist/assets/polyfill-force-11887b4b.js    5.21 kB │ gzip:   2.03 kB
dist/assets/zh-CN-cf74d136.js             7.72 kB │ gzip:   3.26 kB
dist/assets/zh-TW-6a74a185.js             7.86 kB │ gzip:   3.36 kB
dist/assets/ko-2cf626e6.js                8.18 kB │ gzip:   3.39 kB
dist/assets/ja-6f78282b.js                8.35 kB │ gzip:   3.58 kB
dist/assets/en-c240dff3.js                9.95 kB │ gzip:   2.95 kB
dist/assets/vi-e4ef4fd6.js                9.97 kB │ gzip:   3.34 kB
dist/assets/th-2a34d5e0.js               10.14 kB │ gzip:   3.77 kB
dist/assets/sv-a901b08f.js               10.22 kB │ gzip:   3.27 kB
dist/assets/da-1564850b.js               10.30 kB │ gzip:   3.26 kB
dist/assets/nb-0a6d8490.js               10.35 kB │ gzip:   3.25 kB
dist/assets/pl-a603e9c2.js               10.39 kB │ gzip:   3.39 kB
dist/assets/cs-3c753a97.js               10.40 kB │ gzip:   3.50 kB
dist/assets/fi-c0a9d95f.js               10.63 kB │ gzip:   3.41 kB
dist/assets/tr-bd45be97.js               10.68 kB │ gzip:   3.39 kB
dist/assets/it-8bb02787.js               10.72 kB │ gzip:   3.32 kB
dist/assets/pt-PT-af188c06.js            10.85 kB │ gzip:   3.34 kB
dist/assets/nl-0772ea77.js               10.89 kB │ gzip:   3.25 kB
dist/assets/pt-BR-8a1d5660.js            10.94 kB │ gzip:   3.36 kB
dist/assets/es-5e0e20e7.js               10.95 kB │ gzip:   3.39 kB
dist/assets/de-a04fe3bd.js               11.11 kB │ gzip:   3.35 kB
dist/assets/fr-1848494a.js               11.31 kB │ gzip:   3.48 kB
dist/assets/index-41437cc7.js            53.59 kB │ gzip:  18.93 kB
dist/assets/polyfill-904c231f.js        133.64 kB │ gzip:  40.74 kB
dist/assets/index-991532e3.js           618.82 kB │ gzip: 164.28 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 47.73s
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ composer build
> composer build-frontend-links
> ln -sf ../frontend/dist/assets public/assets &amp;&amp; ln -sf ../frontend/dist/index.html public/index.html
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod$ cd public/
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-0605-prod/public$ ls -l
total 0
lrwxrwxrwx 1 wangqiang wangqiang   23 Jun  6 10:06 assets -> ../frontend/dist/assets
-rwxrwxrwx 1 wangqiang wangqiang    0 Jun  5 15:00 favicon.ico
lrwxrwxrwx 1 wangqiang wangqiang   27 Jun  8 09:45 index.html -> ../frontend/dist/index.html
-rwxrwxrwx 1 wangqiang wangqiang 1743 Jun  5 15:00 index.php
-rwxrwxrwx 1 wangqiang wangqiang   24 Jun  5 15:00 robots.txt


14、基于 FTP 上传 目录 learn-php-app-0605-prod 下的所有文件。总计大小为 150 MB 左右。上传时间过长,最张决定在生产环境中构建。目录:vendor、frontend/node_modules 不上传。如图5

基于 FTP 上传 目录 learn-php-app-0605-prod 下的所有文件。总计大小为 150 MB 左右。上传时间过长,最张决定在生产环境中构建。目录:vendor、frontend/node_modules 不上传

图5

15、安装 Node.js 与 Composer,Node.js 安装后需要重启实例


[root@iZ23wv7v5ggZ ~]# ~/oneinstack/install.sh --node

#######################################################################
#       OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################

Download Nodejs...
--2023-06-08 10:45:47--  https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/v18.14.2/node-v18.14.2-linux-x64.tar.gz
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44201520 (42M) [application/octet-stream]
Saving to: ‘node-v18.14.2-linux-x64.tar.gz’

     0K .......... .......... .......... .......... ..........  0%  878K 49s
    50K .......... .......... .......... .......... ..........  0% 1.79M 36s
 43150K .......... .....                                      100% 14.2M=2.7s

2023-06-08 10:45:50 (15.7 MB/s) - ‘node-v18.14.2-linux-x64.tar.gz’ saved [44201520/44201520]

Nodejs installed successfully!
[xprober.php] found
####################Congratulations########################
Total OneinStack Install Time: 0 minutes

[root@iZ23wv7v5ggZ ~]# node -v
-bash: node: command not found

[root@iZ23wv7v5ggZ ~]# ~/oneinstack/addons.sh

#######################################################################
#       OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+      #
#                    Install/Uninstall Extensions                     #
#       For more information please visit https://oneinstack.com      #
#######################################################################

What Are You Doing?
        1. Install/Uninstall PHP Composer
        2. Install/Uninstall fail2ban
        3. Install/Uninstall ngx_lua_waf
        4. Install/Uninstall Python3.6
        q. Exit
Please input the correct option: 1

Please select an action:
        1. install
        2. uninstall
Please input a number:(Default 1 press Enter) 1

PHP Composer installed successfully!

What Are You Doing?
        1. Install/Uninstall PHP Composer
        2. Install/Uninstall fail2ban
        3. Install/Uninstall ngx_lua_waf
        4. Install/Uninstall Python3.6
        q. Exit
Please input the correct option: q
[root@iZ23wv7v5ggZ ~]# composer -V
Composer version 2.5.7 2023-05-24 15:00:39
[root@iZ23wv7v5ggZ ~]# node -v
v18.14.2



16、当FTP上传完毕后,创建数据库(连接信息与 .env 中的保持一致),生成APP_KEY ,执行数据库迁移,构建前端与后端



[root@iZ23wv7v5ggZ frontend]# npm install
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.

added 359 packages, and audited 360 packages in 17s

41 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 9.5.0 -> 9.7.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.7.1
npm notice Run npm install -g npm@9.7.1 to update!
npm notice
[root@iZ23wv7v5ggZ frontend]# SHOPIFY_API_KEY=c7f826670575f7ae069f7e56350465ef npm run build

> shopify-frontend-template-react@1.0.0 build
> vite build

vite v4.3.9 building for production...
✓ 1966 modules transformed.
dist/assets/empty-state-8039a1e1.svg      0.26 kB │ gzip:   0.20 kB
dist/index.html                           0.48 kB │ gzip:   0.33 kB
dist/assets/home-trophy-d70b3542.png     20.65 kB
dist/assets/index-37530742.css          371.48 kB │ gzip:  45.42 kB
dist/assets/ja-abb1af27.js                0.21 kB │ gzip:   0.15 kB
dist/assets/ko-ef9a93f5.js                0.21 kB │ gzip:   0.15 kB
dist/assets/th-32f01d1c.js                0.21 kB │ gzip:   0.15 kB
dist/assets/zh-4775ba45.js                0.21 kB │ gzip:   0.15 kB
dist/assets/vi-72f55a87.js                0.23 kB │ gzip:   0.17 kB
dist/assets/nb-79727cd5.js                0.24 kB │ gzip:   0.17 kB
dist/assets/tr-d5c962f0.js                0.24 kB │ gzip:   0.17 kB
dist/assets/de-5d4a5256.js                0.28 kB │ gzip:   0.20 kB
dist/assets/fi-e67a7779.js                0.28 kB │ gzip:   0.20 kB
dist/assets/nl-ed6c02b1.js                0.28 kB │ gzip:   0.20 kB
dist/assets/da-9b835bb8.js                0.31 kB │ gzip:   0.22 kB
dist/assets/cs-d855408e.js                0.32 kB │ gzip:   0.23 kB
dist/assets/sv-8ac62b51.js                0.37 kB │ gzip:   0.25 kB
dist/assets/en-d265ad8d.js                0.41 kB │ gzip:   0.26 kB
dist/assets/es-fd2f35f4.js                0.41 kB │ gzip:   0.29 kB
dist/assets/pt-227fd344.js                0.41 kB │ gzip:   0.29 kB
dist/assets/pt-PT-a0c51464.js             0.41 kB │ gzip:   0.29 kB
dist/assets/pl-ab15c7ea.js                0.42 kB │ gzip:   0.29 kB
dist/assets/fr-23e50d95.js                0.43 kB │ gzip:   0.29 kB
dist/assets/it-08f76780.js                0.45 kB │ gzip:   0.30 kB
dist/assets/en-df34a502.js                1.53 kB │ gzip:   0.77 kB
dist/assets/de-2ae5c9fa.js                1.72 kB │ gzip:   0.90 kB
dist/assets/fr-5253333d.js                1.83 kB │ gzip:   0.94 kB
dist/assets/polyfill-force-11887b4b.js    5.21 kB │ gzip:   2.03 kB
dist/assets/zh-CN-cf74d136.js             7.72 kB │ gzip:   3.26 kB
dist/assets/zh-TW-6a74a185.js             7.86 kB │ gzip:   3.36 kB
dist/assets/ko-2cf626e6.js                8.18 kB │ gzip:   3.39 kB
dist/assets/ja-6f78282b.js                8.35 kB │ gzip:   3.58 kB
dist/assets/en-c240dff3.js                9.95 kB │ gzip:   2.95 kB
dist/assets/vi-e4ef4fd6.js                9.97 kB │ gzip:   3.34 kB
dist/assets/th-2a34d5e0.js               10.14 kB │ gzip:   3.77 kB
dist/assets/sv-a901b08f.js               10.22 kB │ gzip:   3.27 kB
dist/assets/da-1564850b.js               10.30 kB │ gzip:   3.26 kB
dist/assets/nb-0a6d8490.js               10.35 kB │ gzip:   3.25 kB
dist/assets/pl-a603e9c2.js               10.39 kB │ gzip:   3.39 kB
dist/assets/cs-3c753a97.js               10.40 kB │ gzip:   3.50 kB
dist/assets/fi-c0a9d95f.js               10.63 kB │ gzip:   3.41 kB
dist/assets/tr-bd45be97.js               10.68 kB │ gzip:   3.39 kB
dist/assets/it-8bb02787.js               10.72 kB │ gzip:   3.32 kB
dist/assets/pt-PT-af188c06.js            10.85 kB │ gzip:   3.34 kB
dist/assets/nl-0772ea77.js               10.89 kB │ gzip:   3.25 kB
dist/assets/pt-BR-8a1d5660.js            10.94 kB │ gzip:   3.36 kB
dist/assets/es-5e0e20e7.js               10.95 kB │ gzip:   3.39 kB
dist/assets/de-a04fe3bd.js               11.11 kB │ gzip:   3.35 kB
dist/assets/fr-1848494a.js               11.31 kB │ gzip:   3.48 kB
dist/assets/index-41437cc7.js            53.59 kB │ gzip:  18.93 kB
dist/assets/polyfill-904c231f.js        133.64 kB │ gzip:  40.74 kB
dist/assets/index-991532e3.js           618.82 kB │ gzip: 164.28 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 21.56s
[root@iZ23wv7v5ggZ frontend]# cd ..
[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - league/flysystem is locked to version 1.1.10 and an update of this package was not requested.
    - league/flysystem 1.1.10 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 2
    - league/mime-type-detection is locked to version 1.11.0 and an update of this package was not requested.
    - league/mime-type-detection 1.11.0 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 3
    - league/flysystem 1.1.10 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - laravel/framework v8.83.27 requires league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.10].
    - laravel/framework is locked to version v8.83.27 and an update of this package was not requested.

To enable extensions, verify that they are enabled in your .ini files:
    - /usr/local/php/etc/php.ini
    - /usr/local/php/etc/php.d/02-opcache.ini
    - /usr/local/php/etc/php.d/03-imagick.ini
    - /usr/local/php/etc/php.d/04-ldap.ini
    - /usr/local/php/etc/php.d/05-redis.ini
    - /usr/local/php/etc/php.d/07-mongodb.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.



17、安装 PHP 扩展 fileinfo 后,再次执行。报错:The Process class relies on proc_open, which is not available on your PHP installation.

[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 114 installs, 0 updates, 0 removals
proc_open is disabled so 'unzip' and '7z' commands cannot be used, zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Enabling proc_open and installing 'unzip' or '7z' (21.01+) may remediate them.
  - Downloading brick/math (0.11.0)
  - Downloading psr/log (2.0.0)
  - Downloading psr/cache (3.0.0)
  - Downloading doctrine/event-manager (2.0.0)
  - Downloading doctrine/deprecations (v1.1.1)
  - Downloading doctrine/cache (2.2.0)
  - Downloading doctrine/dbal (3.6.3)
  - Downloading doctrine/lexer (1.2.3)
  - Downloading symfony/polyfill-ctype (v1.27.0)
  - Downloading webmozart/assert (1.11.0)
  - Downloading dragonmantank/cron-expression (v3.3.2)
  - Downloading symfony/polyfill-php80 (v1.27.0)
  - Downloading symfony/polyfill-mbstring (v1.27.0)
  - Downloading symfony/var-dumper (v5.4.24)
  - Downloading symfony/polyfill-intl-normalizer (v1.27.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.27.0)
  - Downloading symfony/string (v6.3.0)
  - Downloading symfony/deprecation-contracts (v3.3.0)
  - Downloading psr/container (1.1.2)
  - Downloading symfony/service-contracts (v2.5.2)
  - Downloading symfony/polyfill-php73 (v1.27.0)
  - Downloading symfony/console (v5.4.24)
  - Downloading monolog/monolog (2.9.1)
  - Downloading voku/portable-ascii (1.6.1)
  - Downloading phpoption/phpoption (1.9.1)
  - Downloading graham-campbell/result-type (v1.1.1)
  - Downloading vlucas/phpdotenv (v5.5.0)
  - Downloading symfony/css-selector (v6.3.0)
  - Downloading tijsverkoyen/css-to-inline-styles (2.2.6)
  - Downloading symfony/routing (v5.4.22)
  - Downloading symfony/process (v5.4.24)
  - Downloading symfony/polyfill-php72 (v1.27.0)
  - Downloading symfony/polyfill-intl-idn (v1.27.0)
  - Downloading symfony/mime (v5.4.23)
  - Downloading symfony/http-foundation (v5.4.24)
  - Downloading psr/event-dispatcher (1.0.0)
  - Downloading symfony/event-dispatcher-contracts (v3.3.0)
  - Downloading symfony/event-dispatcher (v6.3.0)
  - Downloading symfony/error-handler (v5.4.24)
  - Downloading symfony/http-kernel (v5.4.24)
  - Downloading symfony/finder (v5.4.21)
  - Downloading symfony/polyfill-iconv (v1.27.0)
  - Downloading egulias/email-validator (2.1.25)
  - Downloading swiftmailer/swiftmailer (v6.3.0)
  - Downloading ramsey/collection (2.0.0)
  - Downloading ramsey/uuid (4.7.4)
  - Downloading psr/simple-cache (1.0.1)
  - Downloading opis/closure (3.6.3)
  - Downloading symfony/translation-contracts (v3.3.0)
  - Downloading symfony/translation (v6.3.0)
  - Downloading nesbot/carbon (2.67.0)
  - Downloading league/mime-type-detection (1.11.0)
  - Downloading league/flysystem (1.1.10)
  - Downloading nette/utils (v4.0.0)
  - Downloading nette/schema (v1.2.3)
  - Downloading dflydev/dot-access-data (v3.0.2)
  - Downloading league/config (v1.2.0)
  - Downloading league/commonmark (2.4.0)
  - Downloading laravel/serializable-closure (v1.3.0)
  - Downloading doctrine/inflector (2.0.6)
  - Downloading laravel/framework (v8.83.27)
  - Downloading facade/ignition-contracts (1.0.2)
  - Downloading facade/flare-client-php (1.10.0)
  - Downloading facade/ignition (2.17.7)
  - Downloading fakerphp/faker (v1.22.0)
  - Downloading fideloper/proxy (4.4.2)
  - Downloading fruitcake/php-cors (v1.2.0)
  - Downloading fruitcake/laravel-cors (v3.0.0)
  - Downloading guzzlehttp/promises (2.0.0)
  - Downloading symfony/yaml (v6.3.0)
  - Downloading laravel/sail (v1.22.0)
  - Downloading nikic/php-parser (v4.15.5)
  - Downloading psy/psysh (v0.11.18)
  - Downloading laravel/tinker (v2.8.1)
  - Downloading hamcrest/hamcrest-php (v2.0.1)
  - Downloading mockery/mockery (1.6.1)
  - Downloading filp/whoops (2.15.2)
  - Downloading nunomaduro/collision (v5.11.0)
  - Downloading sebastian/version (3.0.2)
  - Downloading sebastian/type (3.2.1)
  - Downloading sebastian/resource-operations (3.0.3)
  - Downloading sebastian/recursion-context (4.0.5)
  - Downloading sebastian/object-reflector (2.0.4)
  - Downloading sebastian/object-enumerator (4.0.4)
  - Downloading sebastian/global-state (5.0.5)
  - Downloading sebastian/exporter (4.0.5)
  - Downloading sebastian/environment (5.1.5)
  - Downloading sebastian/diff (4.0.5)
  - Downloading sebastian/comparator (4.0.8)
  - Downloading sebastian/code-unit (1.0.8)
  - Downloading sebastian/cli-parser (1.0.1)
  - Downloading phpunit/php-timer (5.0.3)
  - Downloading phpunit/php-text-template (2.0.4)
  - Downloading phpunit/php-invoker (3.1.1)
  - Downloading phpunit/php-file-iterator (3.0.6)
  - Downloading theseer/tokenizer (1.2.1)
  - Downloading sebastian/lines-of-code (1.0.3)
  - Downloading sebastian/complexity (2.0.2)
  - Downloading sebastian/code-unit-reverse-lookup (2.0.3)
  - Downloading phpunit/php-code-coverage (9.2.26)
  - Downloading phar-io/version (3.2.1)
  - Downloading phar-io/manifest (2.0.3)
  - Downloading myclabs/deep-copy (1.11.1)
  - Downloading doctrine/instantiator (2.0.0)
  - Downloading phpunit/phpunit (9.6.8)
  - Downloading psr/http-message (1.1)
  - Downloading psr/http-factory (1.0.2)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-client (1.0.2)
  - Downloading guzzlehttp/psr7 (2.5.0)
  - Downloading guzzlehttp/guzzle (7.7.0)
  - Downloading firebase/php-jwt (v6.5.0)
  - Downloading shopify/shopify-api (v5.0.0)
  - Downloading squizlabs/php_codesniffer (3.7.2)
  - Installing brick/math (0.11.0): Extracting archive
  - Installing psr/log (2.0.0): Extracting archive
  - Installing psr/cache (3.0.0): Extracting archive
  - Installing doctrine/event-manager (2.0.0): Extracting archive
  - Installing doctrine/deprecations (v1.1.1): Extracting archive
  - Installing doctrine/cache (2.2.0): Extracting archive
  - Installing doctrine/dbal (3.6.3): Extracting archive
  - Installing doctrine/lexer (1.2.3): Extracting archive
  - Installing symfony/polyfill-ctype (v1.27.0): Extracting archive
  - Installing webmozart/assert (1.11.0): Extracting archive
  - Installing dragonmantank/cron-expression (v3.3.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive
  - Installing symfony/var-dumper (v5.4.24): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive
  - Installing symfony/string (v6.3.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.3.0): Extracting archive
  - Installing psr/container (1.1.2): Extracting archive
  - Installing symfony/service-contracts (v2.5.2): Extracting archive
  - Installing symfony/polyfill-php73 (v1.27.0): Extracting archive
  - Installing symfony/console (v5.4.24): Extracting archive
  - Installing monolog/monolog (2.9.1): Extracting archive
  - Installing voku/portable-ascii (1.6.1): Extracting archive
  - Installing phpoption/phpoption (1.9.1): Extracting archive
  - Installing graham-campbell/result-type (v1.1.1): Extracting archive
  - Installing vlucas/phpdotenv (v5.5.0): Extracting archive
  - Installing symfony/css-selector (v6.3.0): Extracting archive
  - Installing tijsverkoyen/css-to-inline-styles (2.2.6): Extracting archive
  - Installing symfony/routing (v5.4.22): Extracting archive
  - Installing symfony/process (v5.4.24): Extracting archive
  - Installing symfony/polyfill-php72 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.27.0): Extracting archive
  - Installing symfony/mime (v5.4.23): Extracting archive
  - Installing symfony/http-foundation (v5.4.24): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v3.3.0): Extracting archive
  - Installing symfony/event-dispatcher (v6.3.0): Extracting archive
  - Installing symfony/error-handler (v5.4.24): Extracting archive
  - Installing symfony/http-kernel (v5.4.24): Extracting archive
  - Installing symfony/finder (v5.4.21): Extracting archive
  - Installing symfony/polyfill-iconv (v1.27.0): Extracting archive
  - Installing egulias/email-validator (2.1.25): Extracting archive
  - Installing swiftmailer/swiftmailer (v6.3.0): Extracting archive
  - Installing ramsey/collection (2.0.0): Extracting archive
  - Installing ramsey/uuid (4.7.4): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing opis/closure (3.6.3): Extracting archive
  - Installing symfony/translation-contracts (v3.3.0): Extracting archive
  - Installing symfony/translation (v6.3.0): Extracting archive
  - Installing nesbot/carbon (2.67.0): Extracting archive
  - Installing league/mime-type-detection (1.11.0): Extracting archive
  - Installing league/flysystem (1.1.10): Extracting archive
  - Installing nette/utils (v4.0.0): Extracting archive
  - Installing nette/schema (v1.2.3): Extracting archive
  - Installing dflydev/dot-access-data (v3.0.2): Extracting archive
  - Installing league/config (v1.2.0): Extracting archive
  - Installing league/commonmark (2.4.0): Extracting archive
  - Installing laravel/serializable-closure (v1.3.0): Extracting archive
  - Installing doctrine/inflector (2.0.6): Extracting archive
  - Installing laravel/framework (v8.83.27): Extracting archive
  - Installing facade/ignition-contracts (1.0.2): Extracting archive
  - Installing facade/flare-client-php (1.10.0): Extracting archive
  - Installing facade/ignition (2.17.7): Extracting archive
  - Installing fakerphp/faker (v1.22.0): Extracting archive
  - Installing fideloper/proxy (4.4.2): Extracting archive
  - Installing fruitcake/php-cors (v1.2.0): Extracting archive
  - Installing fruitcake/laravel-cors (v3.0.0): Extracting archive
  - Installing guzzlehttp/promises (2.0.0): Extracting archive
  - Installing symfony/yaml (v6.3.0): Extracting archive
  - Installing laravel/sail (v1.22.0): Extracting archive
  - Installing nikic/php-parser (v4.15.5): Extracting archive
  - Installing psy/psysh (v0.11.18): Extracting archive
  - Installing laravel/tinker (v2.8.1): Extracting archive
  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
  - Installing mockery/mockery (1.6.1): Extracting archive
  - Installing filp/whoops (2.15.2): Extracting archive
  - Installing nunomaduro/collision (v5.11.0): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (3.2.1): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.5): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.5): Extracting archive
  - Installing sebastian/exporter (4.0.5): Extracting archive
  - Installing sebastian/environment (5.1.5): Extracting archive
  - Installing sebastian/diff (4.0.5): Extracting archive
  - Installing sebastian/comparator (4.0.8): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.26): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.11.1): Extracting archive
  - Installing doctrine/instantiator (2.0.0): Extracting archive
  - Installing phpunit/phpunit (9.6.8): Extracting archive
  - Installing psr/http-message (1.1): Extracting archive
  - Installing psr/http-factory (1.0.2): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-client (1.0.2): Extracting archive
  - Installing guzzlehttp/psr7 (2.5.0): Extracting archive
  - Installing guzzlehttp/guzzle (7.7.0): Extracting archive
  - Installing firebase/php-jwt (v6.5.0): Extracting archive
  - Installing shopify/shopify-api (v5.0.0): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
 
In Process.php line 146:
 
  The Process class relies on proc_open, which is not available on your PHP installation.
 
 
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [&lt;packages>...]
 
 

18、参考:Jenkins 构建镜像时,报错:The Process class relies on proc_open, which is not available on your PHP installation.的解决 。 编辑 /usr/local/php/etc/php.ini,在 disable_functions 中删除 proc_open、proc_get_status


disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen

[root@iZ23wv7v5ggZ php]# service php-fpm restart
Redirecting to /bin/systemctl restart php-fpm.service
[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/sail
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
81 packages you are using are looking for funding.
Use the `composer fund` command to find out more!



19、执行数据库迁移时失败,报错:SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes


[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migration table created successfully.
Migrating: 2019_08_19_000000_create_failed_jobs_table

   Illuminate\Database\QueryException

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `failed_jobs` add unique `failed_jobs_uuid_unique`(`uuid`))

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }

      +9 vendor frames
  10  database/migrations/2019_08_19_000000_create_failed_jobs_table.php:24
      Illuminate\Support\Facades\Facade::__callStatic()

      +22 vendor frames
  33  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()


20、参考:阿里云RDS的参数配置,启用Innodb_large_prefix 。编辑 config/database.php,修改 ‘engine’ => null, 为 ‘engine’ => ‘InnoDB’,。再次执行数据库迁移,报错。SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘failed_jobs’ already exists。在数据库中删除掉所有表后,重新执行迁移。不再报错。


[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migration table created successfully.
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated:  2019_08_19_000000_create_failed_jobs_table (13.03ms)
Migrating: 2021_05_03_050717_create_sessions_table
Migrated:  2021_05_03_050717_create_sessions_table (11.62ms)
Migrating: 2021_05_05_071311_add_scope_expires_access_token_to_sessions
Migrated:  2021_05_05_071311_add_scope_expires_access_token_to_sessions (9.72ms)
Migrating: 2021_05_11_151158_add_online_access_info_to_sessions
Migrated:  2021_05_11_151158_add_online_access_info_to_sessions (9.32ms)
Migrating: 2021_05_17_152611_change_sessions_user_id_type
Migrated:  2021_05_17_152611_change_sessions_user_id_type (48.28ms)



21、构建后端。


[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# composer build
> composer build-frontend-links
> ln -sf ../frontend/dist/assets public/assets &amp;&amp; ln -sf ../frontend/dist/index.html public/index.html



22、访问应用首页:https://learn-php-app-0605-prod.shuijingwanwq.com/ 。响应 403。如图6

访问应用首页:https://learn-php-app-0605-prod.shuijingwanwq.com/ 。响应 403

图6

23、查看虚拟主机配置文件


[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# cat /usr/local/nginx/conf/vhost/learn-php-app-0605-prod.shuijingwanwq.com.conf
server {
  listen 80;
  listen [::]:80;
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  ssl_certificate /usr/local/nginx/conf/ssl/learn-php-app-0605-prod.shuijingwanwq.com.crt;
  ssl_certificate_key /usr/local/nginx/conf/ssl/learn-php-app-0605-prod.shuijingwanwq.com.key;
  ssl_protocols TLSv1.2 TLSv1.3;
  ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
  ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256;
  ssl_conf_command Ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256;
  ssl_conf_command Options PrioritizeChaCha;
  ssl_prefer_server_ciphers on;
  ssl_session_timeout 10m;
  ssl_session_cache shared:SSL:10m;
  ssl_buffer_size 2k;
  add_header Strict-Transport-Security max-age=15768000;
  ssl_stapling on;
  ssl_stapling_verify on;
  server_name learn-php-app-0605-prod.shuijingwanwq.com;
  access_log /data/wwwlogs/learn-php-app-0605-prod.shuijingwanwq.com_nginx.log combined;
  index index.html index.htm index.php;
  root /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com;
  if ($ssl_protocol = "") { return 301 https://$host$request_uri; }

  include /usr/local/nginx/conf/rewrite/laravel.conf;
  #error_page 404 /404.html;
  #error_page 502 /502.html;
  location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
    valid_referers none blocked *.shuijingwanwq.com learn-php-app-0605-prod.shuijingwanwq.com;
    if ($invalid_referer) {
        return 403;
    }
  }
  location ~ [^/]\.php(/|$) {
    #fastcgi_pass remote_php_ip:9000;
    fastcgi_pass unix:/dev/shm/php-cgi.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
  }

  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
    expires 30d;
    access_log off;
  }
  location ~ .*\.(js|css)?$ {
    expires 7d;
    access_log off;
  }
  location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
    deny all;
  }
  location /.well-known {
    allow all;
  }
}
[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# ^C
[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]# cat /usr/local/nginx/conf/rewrite/laravel.conf
location / {
  try_files $uri $uri/ /index.php?$query_string;
}
[root@iZ23wv7v5ggZ learn-php-app-0605-prod.shuijingwanwq.com]#



24、参考模板中的 nginx.conf,其内容如下


user www-data www-data;

events {
    worker_connections 1024;
}

http {
    index index.php index.html;

    upstream php {
        server 127.0.0.1:9000;
    }

    server {
        include /etc/nginx/mime.types;
        include /etc/nginx/default.d/*.conf;

        listen PORT;
        server_name 0.0.0.0;
        root /app/public;

        location / {
            try_files $uri $uri/ /index.php?$args;
        }

        location ~ [^/]\.php(/|$) {
            include /etc/nginx/fastcgi_params;

            try_files $uri $uri/ /index.php?$uri;

            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO       $fastcgi_path_info;
            fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

            fastcgi_pass   php;
            fastcgi_index  index.php;
        }
    }
}


25、编辑 /usr/local/nginx/conf/vhost/learn-php-app-0605-prod.shuijingwanwq.com.conf


  index index.php index.html;
  root /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com/public;


26、响应 500,开启 debug,编辑 .env。报错:TypeError
Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given, called in /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com/app/Lib/AuthRedirection.php on line 17 。不用理会,符合预期。如图7

报错:TypeErrorShopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given, called in /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com/app/Lib/AuthRedirection.php on line 17

图7


APP_ENV=local
APP_DEBUG=true


27、更新合作伙伴仪表板中的 URL。如图8

更新合作伙伴仪表板中的 URL

图8

28、在合作伙伴仪表板中,转到应用程序的概览页面。在“测试您的应用”部分中,单击“选择商店”,然后选择一个商店来测试应用。如图9

在合作伙伴仪表板中,转到应用程序的概览页面。在“测试您的应用”部分中,单击“选择商店”,然后选择一个商店来测试应用

图9

29、安装应用时,报错:ops, something went wrong. 。原因应该在于请求参数有误。如图10

安装应用时,报错:ops, something went wrong. 。原因应该在于请求参数有误

图10


client_id: not_defined
scope: not_defined
redirect_uri: https://not_defined/api/auth/callback
state: b27be356-0010-43ae-b3b8-90a337314c0c
grant_options[]: 


30、编辑 .env,参考 .env.testing


APP_NAME="Shopify PHP App 0605 Prod"
APP_ENV=production
APP_KEY=base64:tPbLjWcISYL3Z/HS+OQS2GXvMPb0A7GlvNv6iFwFG6A=
APP_DEBUG=false
APP_URL=https://learn-php-app-0605-prod.shuijingwanwq.com

SHOPIFY_API_KEY=c7f826670575f7ae069f7e56350465ef
SHOPIFY_API_SECRET=4de64aa8281e97055cf7698bbe56039e
SCOPES=write_products
HOST=learn-php-app-0605-prod.shuijingwanwq.com

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=**************
DB_PORT=3306
DB_DATABASE=learn_php_app_0605_prod
DB_USERNAME=learn_php_app_0605_prod
DB_PASSWORD=*********



31、不再报错。如图11

不再报错

图11

32、点击安装应用后,进入店铺后台,但是页面预览为空白。如图12

点击安装应用后,进入店铺后台,但是页面预览为空白

图12

33、重新构建前端与后端后,卸载应用。如图13

重新构建前端与后端后,卸载应用

图13

34、再次安装,刷新页面,页面不再空白,符合预期。如图14

再次安装,刷新页面,页面不再空白,符合预期

图14

]]>
https://www.shuijingwanwq.com/2023/07/13/7855/feed/ 1
在 WSL2 中的 Ubuntu-20.04 中创建应用:Shopify App Template – PHP https://www.shuijingwanwq.com/2023/07/01/7792/ https://www.shuijingwanwq.com/2023/07/01/7792/#comments Sat, 01 Jul 2023 02:06:44 +0000 https://www.shuijingwanwq.com/?p=7792 浏览量: 268

1、参考:在 WSL2 中的 Ubuntu-20.04 中安装 Shopify CLI 3.0(基于 Node.js),提前检查相应的要求是否满足

2、创建应用,选择 PHP 模板,报错:operation not permitted, copyfile

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ npm init @shopify/app@latest
Need to install the following packages:
  @shopify/create-app@3.46.2
Ok to proceed? (y)

Welcome. Let’s get started by naming your app project. You can change it later.

?  Your app project name?
✔  learn-php-app-ubuntu-2004-0602

?  Which template would you like to use?
✔  php


╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  EPERM: operation not permitted, copyfile                                    │
│  '/tmp/cb635eef29c31a10687f90a7693d4848/app/web/storage/logs/.gitignore' ->  │
│   '/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web/storage/lo  │
│  gs/.gitignore'                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

npm notice
npm notice New minor version of npm available! 9.5.1 -> 9.6.7
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.7
npm notice Run npm install -g npm@9.6.7 to update!
npm notice
npm ERR! code 1
npm ERR! path /mnt/e/wwwroot/shopify-app
npm ERR! command failed
npm ERR! command sh -c create-app

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/wangqiang/.npm/_logs/2023-06-02T03_46_50_520Z-debug-0.log
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$

3、在命令 npm init @shopify/app@latest 前添加 sudo,以提升权限,不再报错

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo npm init @shopify/app@latest

Welcome. Let’s get started by naming your app project. You can change it later.

?  Your app project name?
✔  learn-php-app-ubuntu-2004-0602

?  Which template would you like to use?
✔  php

4、参考:安装 PHP 、Composer

wangqiang@DESKTOP-QLPK8QM:~$ sudo apt install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.4 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libjansson4 liblua5.2-0 php-common php7.4 php7.4-cli php7.4-common php7.4-json php7.4-opcache
  php7.4-readline ssl-cert
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.4 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
info: Switch to mpm prefork for package libapache2-mod-php7.4
Module mpm_event disabled.
Enabling module mpm_prefork.
info: Executing deferred 'a2enmod php7.4' for package libapache2-mod-php7.4
Enabling module php7.4.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
invoke-rc.d: could not determine current runlevel
Setting up php7.4 (7.4.3-4ubuntu2.18) ...
Setting up php (2:7.4+75) ...
Processing triggers for ufw (0.36-6ubuntu1) ...
Processing triggers for systemd (245.4-4ubuntu3.21) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

Processing triggers for php7.4-cli (7.4.3-4ubuntu2.18) ...
Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.18) ...
wangqiang@DESKTOP-QLPK8QM:~$ sudo apt install composer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  jsonlint libonig5 php-composer-ca-bundle php-composer-semver php-composer-spdx-licenses php-composer-xdebug-handler
  php-json-schema php-mbstring php-psr-container php-psr-log php-symfony-console php-symfony-filesystem
  php-symfony-finder php-symfony-process php-symfony-service-contracts php7.4-mbstring
Preparing to unpack .../16-composer_1.10.1-1_all.deb ...
Unpacking composer (1.10.1-1) ...
Setting up php-symfony-finder (4.3.8+dfsg-1ubuntu1) ...
Setting up jsonlint (1.7.2-1) ...
Setting up php-psr-container (1.0.0-2) ...
Setting up php-symfony-service-contracts (1.1.8-1) ...
Setting up php-composer-ca-bundle (1.2.6-1) ...
Setting up php-symfony-process (4.3.8+dfsg-1ubuntu1) ...
Setting up php-symfony-filesystem (4.3.8+dfsg-1ubuntu1) ...
Setting up php-psr-log (1.1.2-1) ...
Setting up php-composer-semver (1.5.1-1) ...
Setting up php-json-schema (5.2.9-1) ...
Setting up php-composer-spdx-licenses (1.5.3-1) ...
Setting up libonig5:amd64 (6.9.4-1) ...
Setting up php-composer-xdebug-handler (1.4.0-1) ...
Setting up php7.4-mbstring (7.4.3-4ubuntu2.18) ...

Creating config file /etc/php/7.4/mods-available/mbstring.ini with new version
Setting up php-mbstring (2:7.4+75) ...
Setting up php-symfony-console (4.3.8+dfsg-1ubuntu1) ...
Setting up composer (1.10.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.18) ...
Processing triggers for php7.4-cli (7.4.3-4ubuntu2.18) ...

5、创建应用程序后,设置 Laravel 应用程序。安装依赖包。提示:建议升级至 Composer 2。先卸载掉 Composer 1,再安装 Composer 2 。参考:后续使用:php composer.phar

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ composer install
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ composer -V
Composer 1.10.1 2020-03-13 20:34:27
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo apt-get remove composer
[sudo] password for wangqiang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  jsonlint libfwupdplugin1 libonig5 libxmlb1 php-composer-ca-bundle php-composer-semver php-composer-spdx-licenses
  php-composer-xdebug-handler php-json-schema php-mbstring php-psr-container php-psr-log php-symfony-console
  php-symfony-filesystem php-symfony-finder php-symfony-process php-symfony-service-contracts php7.4-mbstring
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  composer
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1996 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 66661 files and directories currently installed.)
Removing composer (1.10.1-1) ...
Processing triggers for man-db (2.9.1-1) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ composer -V
-bash: /usr/bin/composer: No such file or directory
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php composer-setup.php
All settings correct for using Composer
Downloading...

Composer (version 2.5.7) successfully installed to: /mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web/composer.phar
Use it: php composer.phar
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php composer.phar -V
Composer version 2.5.7 2023-05-24 15:00:39

6、提示:Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php composer.phar install
Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ apt-cache search php | grep cur
l
php-curl - CURL module for PHP [default]
php7.4-curl - CURL module for PHP
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo apt-get install php-curl
[sudo] password for wangqiang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  jsonlint libfwupdplugin1 libonig5 libxmlb1 php-composer-ca-bundle php-composer-semver php-composer-spdx-licenses
  php-composer-xdebug-handler php-json-schema php-mbstring php-psr-container php-psr-log php-symfony-console
  php-symfony-filesystem php-symfony-finder php-symfony-process php-symfony-service-contracts php7.4-mbstring
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  php7.4-curl
The following NEW packages will be installed:
  php-curl php7.4-curl
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.9 kB of archives.
After this operation, 148 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-curl amd64 7.4.3-4ubuntu2.18 [30.9 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 php-curl all 2:7.4+75 [2000 B]
Fetched 32.9 kB in 2s (16.1 kB/s)
Selecting previously unselected package php7.4-curl.
(Reading database ... 66332 files and directories currently installed.)
Preparing to unpack .../php7.4-curl_7.4.3-4ubuntu2.18_amd64.deb ...
Unpacking php7.4-curl (7.4.3-4ubuntu2.18) ...
Selecting previously unselected package php-curl.
Preparing to unpack .../php-curl_2%3a7.4+75_all.deb ...
Unpacking php-curl (2:7.4+75) ...
Setting up php7.4-curl (7.4.3-4ubuntu2.18) ...

Creating config file /etc/php/7.4/mods-available/curl.ini with new version
Setting up php-curl (2:7.4+75) ...
Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.18) ...
Processing triggers for php7.4-cli (7.4.3-4ubuntu2.18) ...

7、Your requirements could not be resolved to an installable set of packages. 根 composer.json 需要 php ~8.0.0 || ~8.1.0 || ~8.2.0 但您的 php 版本 (7.4.3) 不满足该要求。一些必需的扩展也没有启用。

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php composer.phar install
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php ~8.0.0 || ~8.1.0 || ~8.2.0 but your php version (7.4.3) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires PHP extension ext-xml * but it is missing from your system. Install or enable PHP's xml extension.
  Problem 3
    - Root composer.json requires PHP extension ext-zip * but it is missing from your system. Install or enable PHP's zip extension.
  Problem 4
    - Root composer.json requires shopify/shopify-api ^5.0 -> satisfiable by shopify/shopify-api[v5.0.0].
    - shopify/shopify-api v5.0.0 requires php ~8.0.0 || ~8.1.0 || ~8.2.0 -> your php version (7.4.3) does not satisfy that requirement.
  Problem 5
    - Root composer.json requires squizlabs/php_codesniffer ^3.6 -> satisfiable by squizlabs/php_codesniffer[3.6.0, ..., 3.x-dev].
    - squizlabs/php_codesniffer[3.6.0, ..., 3.x-dev] require ext-xmlwriter * -> it is missing from your system. Install or enable PHP's xmlwriter extension.
  Problem 6
    - phpunit/phpunit[9.3.3, ..., 9.6.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
    - Root composer.json requires phpunit/phpunit ^9.3.3 -> satisfiable by phpunit/phpunit[9.3.3, ..., 9.6.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.4/cli/php.ini
    - /etc/php/7.4/cli/conf.d/10-opcache.ini
    - /etc/php/7.4/cli/conf.d/10-pdo.ini
    - /etc/php/7.4/cli/conf.d/20-calendar.ini
    - /etc/php/7.4/cli/conf.d/20-ctype.ini
    - /etc/php/7.4/cli/conf.d/20-curl.ini
    - /etc/php/7.4/cli/conf.d/20-exif.ini
    - /etc/php/7.4/cli/conf.d/20-ffi.ini
    - /etc/php/7.4/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.4/cli/conf.d/20-ftp.ini
    - /etc/php/7.4/cli/conf.d/20-gettext.ini
    - /etc/php/7.4/cli/conf.d/20-iconv.ini
    - /etc/php/7.4/cli/conf.d/20-json.ini
    - /etc/php/7.4/cli/conf.d/20-mbstring.ini
    - /etc/php/7.4/cli/conf.d/20-phar.ini
    - /etc/php/7.4/cli/conf.d/20-posix.ini
    - /etc/php/7.4/cli/conf.d/20-readline.ini
    - /etc/php/7.4/cli/conf.d/20-shmop.ini
    - /etc/php/7.4/cli/conf.d/20-sockets.ini
    - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.4/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.4/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.4/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-xml --ignore-platform-req=ext-zip --ignore-platform-req=ext-xmlwriter --ignore-platform-req=ext-dom` to temporarily ignore these required extensions.

8、参考:在 WSL2 中的 Ubuntu-20.04 中卸载 PHP 7.4,然后安装 PHP 8 

9、继续安装 Composer 依赖

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo apt-get install php8.1-curl
[sudo] password for wangqiang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  php8.1-curl
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 33.6 kB of archives.
After this operation, 152 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php8.1-curl amd64 8.1.18-1+ubuntu20.04.1+deb.sury.org+1 [33.6 kB]
Fetched 33.6 kB in 2s (21.8 kB/s)
Selecting previously unselected package php8.1-curl.
(Reading database ... 65958 files and directories currently installed.)
Preparing to unpack .../php8.1-curl_8.1.18-1+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php8.1-curl (8.1.18-1+ubuntu20.04.1+deb.sury.org+1) ...
Setting up php8.1-curl (8.1.18-1+ubuntu20.04.1+deb.sury.org+1) ...

Creating config file /etc/php/8.1/mods-available/curl.ini with new version
Processing triggers for libapache2-mod-php8.1 (8.1.18-1+ubuntu20.04.1+deb.sury.org+1) ...
Processing triggers for php8.1-cli (8.1.18-1+ubuntu20.04.1+deb.sury.org+1) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php composer.phar install
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires PHP extension ext-xml * but it is missing from your system. Install or enable PHP's xml extension.
  Problem 2
    - Root composer.json requires PHP extension ext-zip * but it is missing from your system. Install or enable PHP's zip extension.
  Problem 3
    - Root composer.json requires squizlabs/php_codesniffer ^3.6 -> satisfiable by squizlabs/php_codesniffer[3.6.0, ..., 3.x-dev].
    - squizlabs/php_codesniffer[3.6.0, ..., 3.x-dev] require ext-xmlwriter * -> it is missing from your system. Install or enable PHP's xmlwriter extension.
  Problem 4
    - phpunit/phpunit[9.3.3, ..., 9.6.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
    - Root composer.json requires phpunit/phpunit ^9.3.3 -> satisfiable by phpunit/phpunit[9.3.3, ..., 9.6.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/8.1/cli/php.ini
    - /etc/php/8.1/cli/conf.d/10-opcache.ini
    - /etc/php/8.1/cli/conf.d/10-pdo.ini
    - /etc/php/8.1/cli/conf.d/20-calendar.ini
    - /etc/php/8.1/cli/conf.d/20-ctype.ini
    - /etc/php/8.1/cli/conf.d/20-curl.ini
    - /etc/php/8.1/cli/conf.d/20-exif.ini
    - /etc/php/8.1/cli/conf.d/20-ffi.ini
    - /etc/php/8.1/cli/conf.d/20-fileinfo.ini
    - /etc/php/8.1/cli/conf.d/20-ftp.ini
    - /etc/php/8.1/cli/conf.d/20-gettext.ini
    - /etc/php/8.1/cli/conf.d/20-iconv.ini
    - /etc/php/8.1/cli/conf.d/20-phar.ini
    - /etc/php/8.1/cli/conf.d/20-posix.ini
    - /etc/php/8.1/cli/conf.d/20-readline.ini
    - /etc/php/8.1/cli/conf.d/20-shmop.ini
    - /etc/php/8.1/cli/conf.d/20-sockets.ini
    - /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
    - /etc/php/8.1/cli/conf.d/20-sysvsem.ini
    - /etc/php/8.1/cli/conf.d/20-sysvshm.ini
    - /etc/php/8.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-xml --ignore-platform-req=ext-zip --ignore-platform-req=ext-xmlwriter --ignore-platform-req=ext-dom` to temporarily ignore these required extensions.
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo apt-get install php8.1-xml
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo apt-get install php8.1-zip
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo php compos
er.phar install
[sudo] password for wangqiang:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 114 installs, 0 updates, 0 removals
  - Downloading brick/math (0.11.0)
  - Downloading psr/log (2.0.0)
  - Downloading psr/cache (3.0.0)
  - Downloading doctrine/event-manager (2.0.0)
  - Downloading doctrine/deprecations (v1.1.0)
  - Downloading doctrine/cache (2.2.0)
  - Downloading doctrine/dbal (3.6.2)
  - Downloading doctrine/lexer (1.2.3)
  - Downloading symfony/polyfill-ctype (v1.27.0)
  - Downloading webmozart/assert (1.11.0)
  - Downloading dragonmantank/cron-expression (v3.3.2)
  - Downloading symfony/polyfill-php80 (v1.27.0)
  - Downloading symfony/polyfill-mbstring (v1.27.0)
  - Downloading symfony/var-dumper (v5.4.24)
  - Downloading symfony/polyfill-intl-normalizer (v1.27.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.27.0)
  - Downloading symfony/string (v6.3.0)
  - Downloading symfony/deprecation-contracts (v3.3.0)
  - Downloading psr/container (1.1.2)
  - Downloading symfony/service-contracts (v2.5.2)
  - Downloading symfony/polyfill-php73 (v1.27.0)
  - Downloading symfony/console (v5.4.24)
  - Downloading monolog/monolog (2.9.1)
  - Downloading voku/portable-ascii (1.6.1)
  - Downloading phpoption/phpoption (1.9.1)
  - Downloading graham-campbell/result-type (v1.1.1)
  - Downloading vlucas/phpdotenv (v5.5.0)
  - Downloading symfony/css-selector (v6.3.0)
  - Downloading tijsverkoyen/css-to-inline-styles (2.2.6)
  - Downloading symfony/routing (v5.4.22)
  - Downloading symfony/process (v5.4.24)
  - Downloading symfony/polyfill-php72 (v1.27.0)
  - Downloading symfony/polyfill-intl-idn (v1.27.0)
  - Downloading symfony/mime (v5.4.23)
  - Downloading symfony/http-foundation (v5.4.24)
  - Downloading psr/event-dispatcher (1.0.0)
  - Downloading symfony/event-dispatcher-contracts (v3.3.0)
  - Downloading symfony/event-dispatcher (v6.3.0)
  - Downloading symfony/error-handler (v5.4.24)
  - Downloading symfony/http-kernel (v5.4.24)
  - Downloading symfony/finder (v5.4.21)
  - Downloading symfony/polyfill-iconv (v1.27.0)
  - Downloading egulias/email-validator (2.1.25)
  - Downloading swiftmailer/swiftmailer (v6.3.0)
  - Downloading ramsey/collection (2.0.0)
  - Downloading ramsey/uuid (4.7.4)
  - Downloading psr/simple-cache (1.0.1)
  - Downloading opis/closure (3.6.3)
  - Downloading symfony/translation-contracts (v3.3.0)
  - Downloading symfony/translation (v6.3.0)
  - Downloading nesbot/carbon (2.67.0)
  - Downloading league/mime-type-detection (1.11.0)
  - Downloading league/flysystem (1.1.10)
  - Downloading nette/utils (v4.0.0)
  - Downloading nette/schema (v1.2.3)
  - Downloading dflydev/dot-access-data (v3.0.2)
  - Downloading league/config (v1.2.0)
  - Downloading league/commonmark (2.4.0)
  - Downloading laravel/serializable-closure (v1.3.0)
  - Downloading doctrine/inflector (2.0.6)
  - Downloading laravel/framework (v8.83.27)
  - Downloading facade/ignition-contracts (1.0.2)
  - Downloading facade/flare-client-php (1.10.0)
  - Downloading facade/ignition (2.17.7)
  - Downloading fakerphp/faker (v1.22.0)
  - Downloading fideloper/proxy (4.4.2)
  - Downloading fruitcake/php-cors (v1.2.0)
  - Downloading fruitcake/laravel-cors (v3.0.0)
  - Downloading guzzlehttp/promises (2.0.0)
  - Downloading symfony/yaml (v6.3.0)
  - Downloading laravel/sail (v1.22.0)
  - Downloading nikic/php-parser (v4.15.5)
  - Downloading psy/psysh (v0.11.18)
  - Downloading laravel/tinker (v2.8.1)
  - Downloading hamcrest/hamcrest-php (v2.0.1)
  - Downloading mockery/mockery (1.5.1)
  - Downloading filp/whoops (2.15.2)
  - Downloading nunomaduro/collision (v5.11.0)
  - Downloading sebastian/version (3.0.2)
  - Downloading sebastian/type (3.2.1)
  - Downloading sebastian/resource-operations (3.0.3)
  - Downloading sebastian/recursion-context (4.0.5)
  - Downloading sebastian/object-reflector (2.0.4)
  - Downloading sebastian/object-enumerator (4.0.4)
  - Downloading sebastian/global-state (5.0.5)
  - Downloading sebastian/exporter (4.0.5)
  - Downloading sebastian/environment (5.1.5)
  - Downloading sebastian/diff (4.0.5)
  - Downloading sebastian/comparator (4.0.8)
  - Downloading sebastian/code-unit (1.0.8)
  - Downloading sebastian/cli-parser (1.0.1)
  - Downloading phpunit/php-timer (5.0.3)
  - Downloading phpunit/php-text-template (2.0.4)
  - Downloading phpunit/php-invoker (3.1.1)
  - Downloading phpunit/php-file-iterator (3.0.6)
  - Downloading theseer/tokenizer (1.2.1)
  - Downloading sebastian/lines-of-code (1.0.3)
  - Downloading sebastian/complexity (2.0.2)
  - Downloading sebastian/code-unit-reverse-lookup (2.0.3)
  - Downloading phpunit/php-code-coverage (9.2.26)
  - Downloading phar-io/version (3.2.1)
  - Downloading phar-io/manifest (2.0.3)
  - Downloading myclabs/deep-copy (1.11.1)
  - Downloading doctrine/instantiator (2.0.0)
  - Downloading phpunit/phpunit (9.6.8)
  - Downloading psr/http-message (1.1)
  - Downloading psr/http-factory (1.0.2)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-client (1.0.2)
  - Downloading guzzlehttp/psr7 (2.5.0)
  - Downloading guzzlehttp/guzzle (7.7.0)
  - Downloading firebase/php-jwt (v6.5.0)
  - Downloading shopify/shopify-api (v5.0.0)
  - Downloading squizlabs/php_codesniffer (3.7.2)
  - Installing brick/math (0.11.0): Extracting archive
  - Installing psr/log (2.0.0): Extracting archive
  - Installing psr/cache (3.0.0): Extracting archive
  - Installing doctrine/event-manager (2.0.0): Extracting archive
  - Installing doctrine/deprecations (v1.1.0): Extracting archive
  - Installing doctrine/cache (2.2.0): Extracting archive
  - Installing doctrine/dbal (3.6.2): Extracting archive
  - Installing doctrine/lexer (1.2.3): Extracting archive
  - Installing symfony/polyfill-ctype (v1.27.0): Extracting archive
  - Installing webmozart/assert (1.11.0): Extracting archive
  - Installing dragonmantank/cron-expression (v3.3.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive
  - Installing symfony/var-dumper (v5.4.24): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive
  - Installing symfony/string (v6.3.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.3.0): Extracting archive
  - Installing psr/container (1.1.2): Extracting archive
  - Installing symfony/service-contracts (v2.5.2): Extracting archive
  - Installing symfony/polyfill-php73 (v1.27.0): Extracting archive
  - Installing symfony/console (v5.4.24): Extracting archive
  - Installing monolog/monolog (2.9.1): Extracting archive
  - Installing voku/portable-ascii (1.6.1): Extracting archive
  - Installing phpoption/phpoption (1.9.1): Extracting archive
  - Installing graham-campbell/result-type (v1.1.1): Extracting archive
  - Installing vlucas/phpdotenv (v5.5.0): Extracting archive
  - Installing symfony/css-selector (v6.3.0): Extracting archive
  - Installing tijsverkoyen/css-to-inline-styles (2.2.6): Extracting archive
  - Installing symfony/routing (v5.4.22): Extracting archive
  - Installing symfony/process (v5.4.24): Extracting archive
  - Installing symfony/polyfill-php72 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.27.0): Extracting archive
  - Installing symfony/mime (v5.4.23): Extracting archive
  - Installing symfony/http-foundation (v5.4.24): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v3.3.0): Extracting archive
  - Installing symfony/event-dispatcher (v6.3.0): Extracting archive
  - Installing symfony/error-handler (v5.4.24): Extracting archive
  - Installing symfony/http-kernel (v5.4.24): Extracting archive
  - Installing symfony/finder (v5.4.21): Extracting archive
  - Installing symfony/polyfill-iconv (v1.27.0): Extracting archive
  - Installing egulias/email-validator (2.1.25): Extracting archive
  - Installing swiftmailer/swiftmailer (v6.3.0): Extracting archive
  - Installing ramsey/collection (2.0.0): Extracting archive
  - Installing ramsey/uuid (4.7.4): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing opis/closure (3.6.3): Extracting archive
  - Installing symfony/translation-contracts (v3.3.0): Extracting archive
  - Installing symfony/translation (v6.3.0): Extracting archive
  - Installing nesbot/carbon (2.67.0): Extracting archive
  - Installing league/mime-type-detection (1.11.0): Extracting archive
  - Installing league/flysystem (1.1.10): Extracting archive
  - Installing nette/utils (v4.0.0): Extracting archive
  - Installing nette/schema (v1.2.3): Extracting archive
  - Installing dflydev/dot-access-data (v3.0.2): Extracting archive
  - Installing league/config (v1.2.0): Extracting archive
  - Installing league/commonmark (2.4.0): Extracting archive
  - Installing laravel/serializable-closure (v1.3.0): Extracting archive
  - Installing doctrine/inflector (2.0.6): Extracting archive
  - Installing laravel/framework (v8.83.27): Extracting archive
  - Installing facade/ignition-contracts (1.0.2): Extracting archive
  - Installing facade/flare-client-php (1.10.0): Extracting archive
  - Installing facade/ignition (2.17.7): Extracting archive
  - Installing fakerphp/faker (v1.22.0): Extracting archive
  - Installing fideloper/proxy (4.4.2): Extracting archive
  - Installing fruitcake/php-cors (v1.2.0): Extracting archive
  - Installing fruitcake/laravel-cors (v3.0.0): Extracting archive
  - Installing guzzlehttp/promises (2.0.0): Extracting archive
  - Installing symfony/yaml (v6.3.0): Extracting archive
  - Installing laravel/sail (v1.22.0): Extracting archive
  - Installing nikic/php-parser (v4.15.5): Extracting archive
  - Installing psy/psysh (v0.11.18): Extracting archive
  - Installing laravel/tinker (v2.8.1): Extracting archive
  - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
  - Installing mockery/mockery (1.5.1): Extracting archive
  - Installing filp/whoops (2.15.2): Extracting archive
  - Installing nunomaduro/collision (v5.11.0): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (3.2.1): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.5): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.5): Extracting archive
  - Installing sebastian/exporter (4.0.5): Extracting archive
  - Installing sebastian/environment (5.1.5): Extracting archive
  - Installing sebastian/diff (4.0.5): Extracting archive
  - Installing sebastian/comparator (4.0.8): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.26): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.11.1): Extracting archive
  - Installing doctrine/instantiator (2.0.0): Extracting archive
  - Installing phpunit/phpunit (9.6.8): Extracting archive
  - Installing psr/http-message (1.1): Extracting archive
  - Installing psr/http-factory (1.0.2): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-client (1.0.2): Extracting archive
  - Installing guzzlehttp/psr7 (2.5.0): Extracting archive
  - Installing guzzlehttp/guzzle (7.7.0): Extracting archive
  - Installing firebase/php-jwt (v6.5.0): Extracting archive
  - Installing shopify/shopify-api (v5.0.0): Extracting archive
  - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/sail
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
81 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

10、安装 MySQL,参考:进入数据库

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo apt install mysql-server
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ mysql --version
mysql  Ver 8.0.33-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo /etc/init.d/mysql start
 * Starting MySQL database server mysqld                                                                su: warning: cannot change directory to /nonexistent: No such file or directory
                                                                                                 [ OK ]
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.33-0ubuntu0.20.04.2 (Ubuntu)

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.01 sec)

mysql> CREATE DATABASE learn_php_app_ubuntu_2004_0602;
Query OK, 1 row affected (0.01 sec)

mysql> SHOW DATABASES;
+--------------------------------+
| Database                       |
+--------------------------------+
| information_schema             |
| learn_php_app_ubuntu_2004_0602 |
| mysql                          |
| performance_schema             |
| sys                            |
+--------------------------------+
5 rows in set (0.00 sec)

mysql>

11、编辑 .env

APP_NAME="Shopify PHP App Ubuntu-20.04"
APP_ENV=local
APP_KEY=
APP_DEBUG=true

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=learn_php_app_ubuntu_2004_0602
DB_USERNAME=
DB_PASSWORD=

12、执行数据库迁移命令时报错:Access denied for user ”@’localhost’ (using password: NO)

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php artisan migrate

   Illuminate\Database\QueryException

  SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = learn_php_app_ubuntu_2004_0602 and table_name = migrations and table_type = 'BASE TABLE')

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
    708▕         // If an exception occurs when attempting to run a query, we'll format the error
    709▕         // message to include the bindings with SQL, which will make this exception a
    710▕         // lot more helpful to the developer instead of just the database's errors.
    711▕         catch (Exception $e) {
  ➜ 712▕             throw new QueryException(
    713▕                 $query, $this->prepareBindings($bindings), $e
    714▕             );
    715▕         }
    716▕     }

      +33 vendor frames
  34  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

13、启动安全脚本提示符:sudo mysql_secure_installation 时,设置密码时提示:Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server.

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ sudo mysql_secure_installation

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.
The 'validate_password' component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Please set the password for root here.

New password:

Re-enter new password:

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
 ... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.

14、执行:sudo cat /etc/mysql/debian.cnf,使用文件中的用户名与密码重新设置 .env ,执行数据库迁移成功

APP_NAME="Shopify PHP App Ubuntu-20.04"
APP_ENV=local
APP_KEY=base64:YFa6CcsSTZ4d0u62FbrCmehnoEx9q9bM5OnqjnAxdeU=
APP_DEBUG=true

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=learn_php_app_ubuntu_2004_0602
DB_USERNAME=debian-sys-maint
DB_PASSWORD=nGWMLgJjXnsnhm7t

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602/web$ php artisan migrate
Migration table created successfully.
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated:  2019_08_19_000000_create_failed_jobs_table (106.88ms)
Migrating: 2021_05_03_050717_create_sessions_table
Migrated:  2021_05_03_050717_create_sessions_table (45.18ms)
Migrating: 2021_05_05_071311_add_scope_expires_access_token_to_sessions
Migrated:  2021_05_05_071311_add_scope_expires_access_token_to_sessions (27.42ms)
Migrating: 2021_05_11_151158_add_online_access_info_to_sessions
Migrated:  2021_05_11_151158_add_online_access_info_to_sessions (23.57ms)
Migrating: 2021_05_17_152611_change_sessions_user_id_type
Migrated:  2021_05_17_152611_change_sessions_user_id_type (630.37ms)

15、启动本地服务器,回到根目录,执行:npm run dev,报错,怀疑是第 3 步骤未执行彻底导致的问题。因为在第 3 步骤未提示:success

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602$ npm run dev

> learn-php-app-ubuntu-2004-0602@1.0.0 dev
> shopify app dev

?  Command `app dev` not found. Did you mean `theme dev`?
✔  Yes, confirm

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  A store is required                                                         │
│                                                                              │
│  Specify the store passing --store={your_store_url} or set the               │
│  SHOPIFY_FLAG_STORE environment variable.                                    │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0602$

16、从头开始新建应用:learn-php-app-ubuntu-2004-0605,需要耐心等待一段时间,不要中途给中止了。如图1

从头开始新建应用:learn-php-app-ubuntu-2004-0605,需要耐心等待一段时间,不要中途给中止了

图1

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo npm init @shopify/app@latest

Welcome. Let’s get started by naming your app project. You can change it later.

?  Your app project name?
✔  learn-php-app-ubuntu-2004-0605

?  Which template would you like to use?
✔  php


╭─ success ────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  learn-php-app-ubuntu-2004-0605 is ready for you to build!                   │
│                                                                              │
│  Next steps                                                                  │
│    • Run `cd learn-php-app-ubuntu-2004-0605`                                 │
│    • For extensions, run `npm run generate extension`                        │
│    • To see your app, run `npm run dev`                                      │
│                                                                              │
│  Reference                                                                   │
│    • Shopify docs [1]                                                        │
│    • For an overview of commands, run `npm run shopify app -- --help`        │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
[1] https://shopify.dev

17、再次从第 4 步骤开始操作,一些步骤可以跳过。执行第 15 步骤,报错:To investigate the issue, examine this stack trace。重新执行即可。进入安装应用。如图2

再次从第 4 步骤开始操作,一些步骤可以跳过。执行第 15 步骤,报错:To investigate the issue, examine this stack trace。重新执行即可。进入安装应用

图2

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605$ composer -V
Composer version 2.5.5 2023-03-21 11:50:05
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605/web$ composer install
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605/web$ cp .env.example .env
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605/web$ php artisan key:generate
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605/web$ php artisan migrate
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605$ npm run dev

> learn-php-app-ubuntu-2004-0605@1.0.0 dev
> shopify app dev


To run this command, log in to Shopify Partners.
👉 Press any key to open the login page on your browser

Auto-open timed out. Open the login page: Log in to Shopify Partners ( http://accounts.shopify.com/oauth/authorize?client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&scope=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&redirect_uri=http%3A%2F%2F127.0.0.1%3A3456&state=5cba6732fe773fac2a7e9a95ddf3ab686b3a9b7231168d58f339f17dcaa1&response_type=code&code_challenge_method=S256&code_challenge=gozZ6hqQIOzwYdzxuX2RaOUgpaRz9A8gUlUoC6Wy6Vw )

✔ Logged in.

Looks like this is the first time you're running dev for this project.
Configure your preferences by answering a few questions.


Before you preview your work, it needs to be associated with an app.

?  Create this project as a new app on Shopify?
✔  Yes, create it as a new app

?  App name:
✔  learn-php-app-ubuntu-2004-0605

✔ Using your default dev store (shuijingwanwq-development) to preview your project.
╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                                                                              │
│  To investigate the issue, examine this stack trace:                         │
│    at pollTunnelStatus (@shopify/app/src/cli/services/dev/urls.ts:106)       │
│      if (result.status === 'error') return reject(new                        │
│      BugError(result.message))                                               │
│    at (@shopify/app/src/cli/services/dev/urls.ts:120)                        │
│      pollTunnelStatus()                                                      │
│    at new Promise                                                            │
│    at pollTunnelURL (@shopify/app/src/cli/services/dev/urls.ts:101)          │
│      return new Promise<string>((resolve, reject) => {                       │
│    at generateFrontendURL (@shopify/app/src/cli/services/dev/urls.ts:89)     │
│      const url = await pollTunnelURL(options.tunnelClient)                   │
│    at dev (@shopify/app/src/cli/services/dev.ts:121)                         │
│      generateFrontendURL({                                                   │
│    at run (@shopify/app/src/cli/commands/app/dev.ts:106)                     │
│      await dev({                                                             │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app/learn-php-app-ubuntu-2004-0605$ npm run dev

> learn-php-app-ubuntu-2004-0605@1.0.0 dev
> shopify app dev

╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Using your previous dev settings:                                           │
│                                                                              │
│    • Org:          王强                                                      │
│    • App:          learn-php-app-ubuntu-2004-0605                            │
│    • Dev store:    shuijingwanwq-development.myshopify.com                   │
│    • Update URLs:  Not yet configured                                        │
│                                                                              │
│  To reset your default dev config, run `npm run dev -- --reset`              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

?  Have Shopify automatically update your app's URL in order to create a preview experience?
✔  Always by default

2023-06-06 01:51:12 │ frontend │
2023-06-06 01:51:12 │ frontend │ > shopify-frontend-template-react@1.0.0 dev
2023-06-06 01:51:12 │ frontend │ > vite
2023-06-06 01:51:12 │ frontend │
2023-06-06 01:51:18 │ backend  │ > Composer\Config::disableProcessTimeout
2023-06-06 01:51:18 │ backend  │ > php artisan serve
2023-06-06 01:51:20 │ frontend │
2023-06-06 01:51:20 │ frontend │   VITE v4.3.9  ready in 7780 ms
2023-06-06 01:51:20 │ frontend │
2023-06-06 01:51:20 │ frontend │   ➜  Local:   http://localhost:33597/
2023-06-06 01:51:26 │ backend  │ Starting Laravel development server: http://127.0.0.1:44681
2023-06-06 01:51:27 │ backend  │ [Tue Jun  6 09:51:26 2023] PHP 8.1.18 Development Server (http://127.0.0.1:44681) started
2023-06-06 01:51:47 │ backend  │ [Tue Jun  6 09:51:47 2023] 127.0.0.1:34304 Accepted
2023-06-06 01:51:54 │ backend  │ [Tue Jun  6 09:51:54 2023] 127.0.0.1:34304 Closing
2023-06-06 01:51:54 │ backend  │ [Tue Jun  6 09:51:54 2023] 127.0.0.1:34310 Accepted
2023-06-06 01:51:56 │ backend  │ [Tue Jun  6 09:51:56 2023] 127.0.0.1:34310 Closing
2023-06-06 01:53:17 │ backend  │ [Tue Jun  6 09:53:17 2023] 127.0.0.1:34320 Accepted
2023-06-06 01:53:22 │ backend  │ [Tue Jun  6 09:53:22 2023] 127.0.0.1:34320 Closing
2023-06-06 01:53:22 │ backend  │ [Tue Jun  6 09:53:22 2023] 127.0.0.1:34326 Accepted
2023-06-06 01:53:26 │ backend  │ [Tue Jun  6 09:53:25 2023] 127.0.0.1:34326 Closing

› Press p │ preview in your browser
› Press q │ quit

Preview URL: https://instructional-attend-excellent-gig.trycloudflare.com?shop=shuijingwanwq-development.myshopify.com&h
ost=c2h1aWppbmd3YW53cS1kZXZlbG9wbWVudC5teXNob3BpZnkuY29tL2FkbWlu

18、安装应用时报错:Shopify\Exception\CookieNotFoundException Could not find the current session id in the cookies。如图3

安装应用时报错:Shopify\Exception\CookieNotFoundException Could not find the current session id in the cookies

图3

19、再次运行:npm run dev,打开浏览器,不再报错。如图4

再次运行:npm run dev,打开浏览器,不再报错

图4

]]>
https://www.shuijingwanwq.com/2023/07/01/7792/feed/ 1
在 WSL2 中的 Ubuntu-20.04 中安装 Shopify CLI 3.0(基于 Node.js),提前检查相应的要求是否满足 https://www.shuijingwanwq.com/2023/06/27/7783/ https://www.shuijingwanwq.com/2023/06/27/7783/#comments Tue, 27 Jun 2023 01:51:43 +0000 https://www.shuijingwanwq.com/?p=7783 浏览量: 242 1、参考:在 Windows 10 专业版中安装 Shopify CLI 3.0(基于 Node.js),提前检查相应的要求是否满足 。 2、参考:在 Linux 中的要求如下


Node.js 16 or higher
Ruby 3.0
Ruby development environment (ruby-dev / ruby-devel)
Git
cURL
GCC
g++
Make


3、Node.js 未安装,参考:安装 。安装失败。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ node -v

Command 'node' not found, but can be installed with:

sudo apt install nodejs

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 93 not upgraded.
Need to get 38.2 kB/6807 kB of archives.
After this operation, 30.7 MB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc-ares2 amd64 1.15.0-1ubuntu0.1
Err:1 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libc-ares2 amd64 1.15.0-1ubuntu0.1
404 Not Found [IP: 185.125.190.39 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/c-ares/libc-ares2_1.15.0-1ubuntu0.1_amd64.deb 404 Not Found [IP: 185.125.190.39 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


4、执行命令:sudo apt-get update


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2192 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2573 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [435 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [16.6 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1882 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [354 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [264 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [636 B]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1064 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [13.0 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [253 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1770 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [24.3 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [25.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [7408 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [612 B]
Get:21 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [249 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [45.7 kB]
Get:23 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [640 B]
Get:24 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [839 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-backports/main Translation-en [16.3 kB]
Get:26 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [173 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [1420 B]
Get:28 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [17.8 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [25.0 kB]
Get:30 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [22.9 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [16.3 kB]
Get:32 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5488 B]
Get:33 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [880 B]
Get:34 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [540 B]
Fetched 12.6 MB in 21s (595 kB/s)
Reading package lists... Done


5、再次执行命令: sudo apt-get install -y nodejs,安装 成功。Node.js 的版本是:v10.19.0,低于 16。不符合要求。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libc-ares2 libnode64 nodejs-doc
Suggested packages:
npm
The following NEW packages will be installed:
libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 248 not upgraded.
Need to get 36.7 kB/6805 kB of archives.
After this operation, 30.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc-ares2 amd64 1.15.0-1ubuntu0.2 [36.7 kB]
Fetched 36.7 kB in 2s (21.7 kB/s)
Selecting previously unselected package libc-ares2:amd64.
(Reading database ... 32378 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.15.0-1ubuntu0.2_amd64.deb ...
Unpacking libc-ares2:amd64 (1.15.0-1ubuntu0.2) ...
Selecting previously unselected package libnode64:amd64.
Preparing to unpack .../libnode64_10.19.0~dfsg-3ubuntu1_amd64.deb ...
Unpacking libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.19.0~dfsg-3ubuntu1_all.deb ...
Unpacking nodejs-doc (10.19.0~dfsg-3ubuntu1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.19.0~dfsg-3ubuntu1_amd64.deb ...
Unpacking nodejs (10.19.0~dfsg-3ubuntu1) ...
Setting up libc-ares2:amd64 (1.15.0-1ubuntu0.2) ...
Setting up libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ...
Setting up nodejs-doc (10.19.0~dfsg-3ubuntu1) ...
Setting up nodejs (10.19.0~dfsg-3ubuntu1) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

Processing triggers for man-db (2.9.1-1) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ node -v
v10.19.0
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$


6、参考:更新至 Node.js v18.x。Node.js 的版本是:v18.16.0,高于 16。符合要求。如图1
更新至 Node.js v18.x。Node.js 的版本是:v18.16.0,高于 16。符合要求

图1



wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &amp;&amp;\
&gt; sudo apt-get install -y nodejs

## Installing the NodeSource Node.js 18.x repo...

## Populating apt-get cache...

+ apt-get update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

## Confirming "focal" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/focal/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg &gt;/dev/null

## Creating apt sources list file for the NodeSource Node.js 18.x repo...

+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x focal main' &gt; /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x focal main' &gt;&gt; /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:5 https://deb.nodesource.com/node_18.x focal InRelease [4583 B]
Get:6 https://deb.nodesource.com/node_18.x focal/main amd64 Packages [776 B]
Fetched 5359 B in 4s (1459 B/s)
Reading package lists... Done

## Run `sudo apt-get install -y nodejs` to install Node.js 18.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg &gt;/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update &amp;&amp; sudo apt-get install yarn

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libc-ares2
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
libnode64 nodejs-doc
The following packages will be upgraded:
nodejs
1 upgraded, 0 newly installed, 2 to remove and 248 not upgraded.
Need to get 28.7 MB of archives.
After this operation, 156 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x focal/main amd64 nodejs amd64 18.16.0-deb-1nodesource1 [28.7 MB]
Fetched 28.7 MB in 8s (3816 kB/s)
(Reading database ... 32510 files and directories currently installed.)
Removing nodejs-doc (10.19.0~dfsg-3ubuntu1) ...
dpkg: libnode64:amd64: dependency problems, but removing anyway as you requested:
nodejs depends on libnode64 (= 10.19.0~dfsg-3ubuntu1).

Removing libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ...
(Reading database ... 32393 files and directories currently installed.)
Preparing to unpack .../nodejs_18.16.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (18.16.0-deb-1nodesource1) over (10.19.0~dfsg-3ubuntu1) ...
Setting up nodejs (18.16.0-deb-1nodesource1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

Processing triggers for man-db (2.9.1-1) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ node -v
v18.16.0
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$


7、Ruby 未安装,安装后的版本是:ruby 2.7.0p0,低于 3.0,不符合要求。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get install ruby-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libc-ares2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
fonts-lato javascript-common libgmp-dev libgmp10 libgmpxx4ldbl libjs-jquery libruby2.7 rake ri ruby ruby-dev
ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7 ruby2.7-dev ruby2.7-doc
rubygems-integration unzip zip
Suggested packages:
apache2 | lighttpd | httpd gmp-doc libgmp10-doc libmpfr-dev bundler
The following NEW packages will be installed:
fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery libruby2.7 rake ri ruby ruby-dev ruby-full
ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7 ruby2.7-dev ruby2.7-doc
rubygems-integration unzip zip
The following packages will be upgraded:
libgmp10
1 upgraded, 22 newly installed, 0 to remove and 247 not upgraded.
Need to get 10.2 MB of archives.
After this operation, 58.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 fonts-lato all 2.0-2 [2698 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgmp10 amd64 2:6.2.0+dfsg-4ubuntu0.1 [241 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 javascript-common all 11 [6066 B]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgmpxx4ldbl amd64 2:6.2.0+dfsg-4ubuntu0.1 [9144 B]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgmp-dev amd64 2:6.2.0+dfsg-4ubuntu0.1 [320 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 libjs-jquery all 3.3.1~dfsg-3 [329 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 rubygems-integration all 1.16 [5092 B]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ruby2.7 amd64 2.7.0-5ubuntu1.11 [95.6 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby amd64 1:2.7+1 [5412 B]
Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 rake all 13.0.1-4 [61.6 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby-minitest all 5.13.0-1 [40.9 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby-net-telnet all 0.1.1-2 [12.6 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby-power-assert all 1.1.7-1 [11.4 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby-test-unit all 3.3.5-1 [73.2 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby-xmlrpc all 0.3.0-2 [23.8 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libruby2.7 amd64 2.7.0-5ubuntu1.11 [3533 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ruby2.7-doc all 2.7.0-5ubuntu1.11 [2160 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal/universe amd64 ri all 1:2.7+1 [4520 B]
Get:19 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ruby2.7-dev amd64 2.7.0-5ubuntu1.11 [182 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 ruby-dev amd64 1:2.7+1 [4632 B]
Get:21 http://archive.ubuntu.com/ubuntu focal/universe amd64 ruby-full all 1:2.7+1 [2728 B]
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 unzip amd64 6.0-25ubuntu1.1 [168 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 zip amd64 3.0-11build1 [167 kB]
Fetched 10.2 MB in 16s (643 kB/s)
Selecting previously unselected package fonts-lato.
(Reading database ... 37931 files and directories currently installed.)
Preparing to unpack .../fonts-lato_2.0-2_all.deb ...
Unpacking fonts-lato (2.0-2) ...
Preparing to unpack .../libgmp10_2%3a6.2.0+dfsg-4ubuntu0.1_amd64.deb ...
Unpacking libgmp10:amd64 (2:6.2.0+dfsg-4ubuntu0.1) over (2:6.2.0+dfsg-4) ...
Setting up libgmp10:amd64 (2:6.2.0+dfsg-4ubuntu0.1) ...
Selecting previously unselected package javascript-common.
(Reading database ... 37954 files and directories currently installed.)
Preparing to unpack .../00-javascript-common_11_all.deb ...
Unpacking javascript-common (11) ...
Selecting previously unselected package libgmpxx4ldbl:amd64.
Preparing to unpack .../01-libgmpxx4ldbl_2%3a6.2.0+dfsg-4ubuntu0.1_amd64.deb ...
Unpacking libgmpxx4ldbl:amd64 (2:6.2.0+dfsg-4ubuntu0.1) ...
Selecting previously unselected package libgmp-dev:amd64.
Preparing to unpack .../02-libgmp-dev_2%3a6.2.0+dfsg-4ubuntu0.1_amd64.deb ...
Unpacking libgmp-dev:amd64 (2:6.2.0+dfsg-4ubuntu0.1) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../03-libjs-jquery_3.3.1~dfsg-3_all.deb ...
Unpacking libjs-jquery (3.3.1~dfsg-3) ...
Selecting previously unselected package rubygems-integration.
Preparing to unpack .../04-rubygems-integration_1.16_all.deb ...
Unpacking rubygems-integration (1.16) ...
Selecting previously unselected package ruby2.7.
Preparing to unpack .../05-ruby2.7_2.7.0-5ubuntu1.11_amd64.deb ...
Unpacking ruby2.7 (2.7.0-5ubuntu1.11) ...
Selecting previously unselected package ruby.
Preparing to unpack .../06-ruby_1%3a2.7+1_amd64.deb ...
Unpacking ruby (1:2.7+1) ...
Selecting previously unselected package rake.
Preparing to unpack .../07-rake_13.0.1-4_all.deb ...
Unpacking rake (13.0.1-4) ...
Selecting previously unselected package ruby-minitest.
Preparing to unpack .../08-ruby-minitest_5.13.0-1_all.deb ...
Unpacking ruby-minitest (5.13.0-1) ...
Selecting previously unselected package ruby-net-telnet.
Preparing to unpack .../09-ruby-net-telnet_0.1.1-2_all.deb ...
Unpacking ruby-net-telnet (0.1.1-2) ...
Selecting previously unselected package ruby-power-assert.
Preparing to unpack .../10-ruby-power-assert_1.1.7-1_all.deb ...
Unpacking ruby-power-assert (1.1.7-1) ...
Selecting previously unselected package ruby-test-unit.
Preparing to unpack .../11-ruby-test-unit_3.3.5-1_all.deb ...
Unpacking ruby-test-unit (3.3.5-1) ...
Selecting previously unselected package ruby-xmlrpc.
Preparing to unpack .../12-ruby-xmlrpc_0.3.0-2_all.deb ...
Unpacking ruby-xmlrpc (0.3.0-2) ...
Selecting previously unselected package libruby2.7:amd64.
Preparing to unpack .../13-libruby2.7_2.7.0-5ubuntu1.11_amd64.deb ...
Unpacking libruby2.7:amd64 (2.7.0-5ubuntu1.11) ...
Selecting previously unselected package ruby2.7-doc.
Preparing to unpack .../14-ruby2.7-doc_2.7.0-5ubuntu1.11_all.deb ...
Unpacking ruby2.7-doc (2.7.0-5ubuntu1.11) ...
Selecting previously unselected package ri.
Preparing to unpack .../15-ri_1%3a2.7+1_all.deb ...
Unpacking ri (1:2.7+1) ...
Selecting previously unselected package ruby2.7-dev:amd64.
Preparing to unpack .../16-ruby2.7-dev_2.7.0-5ubuntu1.11_amd64.deb ...
Unpacking ruby2.7-dev:amd64 (2.7.0-5ubuntu1.11) ...
Selecting previously unselected package ruby-dev:amd64.
Preparing to unpack .../17-ruby-dev_1%3a2.7+1_amd64.deb ...
Unpacking ruby-dev:amd64 (1:2.7+1) ...
Selecting previously unselected package ruby-full.
Preparing to unpack .../18-ruby-full_1%3a2.7+1_all.deb ...
Unpacking ruby-full (1:2.7+1) ...
Selecting previously unselected package unzip.
Preparing to unpack .../19-unzip_6.0-25ubuntu1.1_amd64.deb ...
Unpacking unzip (6.0-25ubuntu1.1) ...
Selecting previously unselected package zip.
Preparing to unpack .../20-zip_3.0-11build1_amd64.deb ...
Unpacking zip (3.0-11build1) ...
Setting up javascript-common (11) ...
Setting up fonts-lato (2.0-2) ...
Setting up ruby-power-assert (1.1.7-1) ...
Setting up unzip (6.0-25ubuntu1.1) ...
Setting up rubygems-integration (1.16) ...
Setting up ruby-minitest (5.13.0-1) ...
Setting up zip (3.0-11build1) ...
Setting up libgmpxx4ldbl:amd64 (2:6.2.0+dfsg-4ubuntu0.1) ...
Setting up ruby-test-unit (3.3.5-1) ...
Setting up ruby-net-telnet (0.1.1-2) ...
Setting up ruby2.7-doc (2.7.0-5ubuntu1.11) ...
Setting up libjs-jquery (3.3.1~dfsg-3) ...
Setting up ruby-xmlrpc (0.3.0-2) ...
Setting up libgmp-dev:amd64 (2:6.2.0+dfsg-4ubuntu0.1) ...
Setting up ruby2.7 (2.7.0-5ubuntu1.11) ...
Setting up ri (1:2.7+1) ...
Setting up ruby (1:2.7+1) ...
Setting up rake (13.0.1-4) ...
Setting up libruby2.7:amd64 (2.7.0-5ubuntu1.11) ...
Setting up ruby2.7-dev:amd64 (2.7.0-5ubuntu1.11) ...
Setting up ruby-dev:amd64 (1:2.7+1) ...
Setting up ruby-full (1:2.7+1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

Processing triggers for man-db (2.9.1-1) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$


8、包管理器中的 Ruby 版本通常都不是最新的。决定基于安装工具 ruby-build 安装 3.0 版本。ruby-build 会尽力下载并编译想要的 Ruby 版本,但有时会因为未满足系统依赖而导致编译失败,或者编译成功但新的 Ruby 版本在运行时出现奇怪的错误。 准备对合理构建环境的建议。参考:构建 。然后再安装 ruby-build。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev
[sudo] password for wangqiang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
libgdbm6 is already the newest version (1.18.1-5).
libgdbm6 set to manually installed.
patch is already the newest version (2.7.6-6).
patch set to manually installed.
libgmp-dev is already the newest version (2:6.2.0+dfsg-4ubuntu0.1).
libgmp-dev set to manually installed.
The following package was automatically installed and is no longer required:
libc-ares2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
automake autotools-dev binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc
gcc-9 gcc-9-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1
libbinutils libc-dev-bin libc6 libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdb5.3-dev libdpkg-perl
libfakeroot libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libncurses-dev
libncurses6 libncursesw6 libquadmath0 libssl1.1 libstd-rust-1.65 libstd-rust-dev libstdc++-9-dev libtinfo6 libtsan0
libubsan1 libuuid1 linux-libc-dev m4 manpages-dev zlib1g
Suggested packages:
autoconf-archive gnu-standards autoconf-doc libtool gettext binutils-doc cpp-doc gcc-9-locales debian-keyring
g++-multilib g++-9-multilib gcc-9-doc gcc-multilib flex bison gdb gcc-doc gcc-9-multilib glibc-doc db5.3-doc bzr
ncurses-doc readline-doc libssl-doc libstdc++-9-doc libyaml-doc m4-doc cargo llvm-14 lld-14 clang-14
The following NEW packages will be installed:
autoconf automake autotools-dev binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-9
dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libasan5 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0
libctf0 libdb-dev libdb5.3-dev libdpkg-perl libfakeroot libffi-dev libfile-fcntllock-perl libgcc-9-dev libgdbm-dev
libgomp1 libisl22 libitm1 liblsan0 libmpc3 libncurses-dev libncurses5-dev libquadmath0 libreadline-dev libssl-dev
libstd-rust-1.65 libstd-rust-dev libstdc++-9-dev libtsan0 libubsan1 libyaml-dev linux-libc-dev m4 manpages-dev rustc
uuid-dev zlib1g-dev
The following packages will be upgraded:
libc6 libncurses6 libncursesw6 libssl1.1 libtinfo6 libuuid1 zlib1g
7 upgraded, 58 newly installed, 0 to remove and 240 not upgraded.
Need to get 136 MB of archives.
After this operation, 593 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6 amd64 2.31-0ubuntu9.9 [2722 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libncursesw6 amd64 6.2-0ubuntu2.1 [132 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libncurses6 amd64 6.2-0ubuntu2.1 [101 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libtinfo6 amd64 6.2-0ubuntu2.1 [87.4 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libuuid1 amd64 2.34-0.1ubuntu9.3 [19.9 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 zlib1g amd64 1:1.2.11.dfsg-2ubuntu1.5 [54.2 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssl1.1 amd64 1.1.1f-1ubuntu2.18 [1322 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 m4 amd64 1.4.18-4 [199 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 autoconf all 2.69-11.1 [321 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 autotools-dev all 20180224.1 [39.6 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 automake all 1:1.16.1-4ubuntu6 [522 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 binutils-common amd64 2.34-6ubuntu1.5 [207 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libbinutils amd64 2.34-6ubuntu1.5 [475 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libctf-nobfd0 amd64 2.34-6ubuntu1.5 [47.4 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libctf0 amd64 2.34-6ubuntu1.5 [46.6 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.34-6ubuntu1.5 [1613 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 binutils amd64 2.34-6ubuntu1.5 [3372 B]
Get:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc-dev-bin amd64 2.31-0ubuntu9.9 [71.8 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-libc-dev amd64 5.4.0-149.166 [1117 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libcrypt-dev amd64 1:4.4.10-10ubuntu4 [104 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc6-dev amd64 2.31-0ubuntu9.9 [2519 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gcc-9-base amd64 9.4.0-1ubuntu1~20.04.1 [19.4 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 libisl22 amd64 0.22.1-1 [592 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libmpc3 amd64 1.1.0-1 [40.8 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 cpp-9 amd64 9.4.0-1ubuntu1~20.04.1 [7500 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/main amd64 cpp amd64 4:9.3.0-1ubuntu2 [27.6 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcc1-0 amd64 10.3.0-1ubuntu1~20.04 [48.8 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgomp1 amd64 10.3.0-1ubuntu1~20.04 [102 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libitm1 amd64 10.3.0-1ubuntu1~20.04 [26.2 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libatomic1 amd64 10.3.0-1ubuntu1~20.04 [9284 B]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libasan5 amd64 9.4.0-1ubuntu1~20.04.1 [2751 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 liblsan0 amd64 10.3.0-1ubuntu1~20.04 [835 kB]
Get:33 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libtsan0 amd64 10.3.0-1ubuntu1~20.04 [2009 kB]
Get:34 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libubsan1 amd64 10.3.0-1ubuntu1~20.04 [784 kB]
Get:35 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libquadmath0 amd64 10.3.0-1ubuntu1~20.04 [146 kB]
Get:36 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgcc-9-dev amd64 9.4.0-1ubuntu1~20.04.1 [2359 kB]
Get:37 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gcc-9 amd64 9.4.0-1ubuntu1~20.04.1 [8274 kB]
Get:38 http://archive.ubuntu.com/ubuntu focal/main amd64 gcc amd64 4:9.3.0-1ubuntu2 [5208 B]
Get:39 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libstdc++-9-dev amd64 9.4.0-1ubuntu1~20.04.1 [1722 kB]
Get:40 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 g++-9 amd64 9.4.0-1ubuntu1~20.04.1 [8420 kB]
Get:41 http://archive.ubuntu.com/ubuntu focal/main amd64 g++ amd64 4:9.3.0-1ubuntu2 [1604 B]
Get:42 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdpkg-perl all 1.19.7ubuntu3.2 [231 kB]
Get:43 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dpkg-dev all 1.19.7ubuntu3.2 [679 kB]
Get:44 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 build-essential amd64 12.8ubuntu1.1 [4664 B]
Get:45 http://archive.ubuntu.com/ubuntu focal/main amd64 libfakeroot amd64 1.24-1 [25.7 kB]
Get:46 http://archive.ubuntu.com/ubuntu focal/main amd64 fakeroot amd64 1.24-1 [62.6 kB]
Get:47 http://archive.ubuntu.com/ubuntu focal/main amd64 libalgorithm-diff-perl all 1.19.03-2 [46.6 kB]
Get:48 http://archive.ubuntu.com/ubuntu focal/main amd64 libalgorithm-diff-xs-perl amd64 0.04-6 [11.3 kB]
Get:49 http://archive.ubuntu.com/ubuntu focal/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
Get:50 http://archive.ubuntu.com/ubuntu focal/main amd64 libfile-fcntllock-perl amd64 0.22-3build4 [33.1 kB]
Get:51 http://archive.ubuntu.com/ubuntu focal/main amd64 libgdbm-dev amd64 1.18.1-5 [83.4 kB]
Get:52 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libncurses-dev amd64 6.2-0ubuntu2.1 [340 kB]
Get:53 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libncurses5-dev amd64 6.2-0ubuntu2.1 [984 B]
Get:54 http://archive.ubuntu.com/ubuntu focal/main amd64 libreadline-dev amd64 8.0-4 [141 kB]
Get:55 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssl-dev amd64 1.1.1f-1ubuntu2.18 [1586 kB]
Get:56 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libstd-rust-1.65 amd64 1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04 [41.8 MB]
Get:57 http://archive.ubuntu.com/ubuntu focal/main amd64 manpages-dev all 5.05-1 [2266 kB]
Get:58 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 zlib1g-dev amd64 1:1.2.11.dfsg-2ubuntu1.5 [155 kB]
Get:59 http://archive.ubuntu.com/ubuntu focal/main amd64 libdb5.3-dev amd64 5.3.28+dfsg1-0.6ubuntu2 [766 kB]
Get:60 http://archive.ubuntu.com/ubuntu focal/main amd64 libdb-dev amd64 1:5.3.21~exp1ubuntu2 [2294 B]
Get:61 http://archive.ubuntu.com/ubuntu focal/main amd64 libffi-dev amd64 3.3-4 [57.0 kB]
Get:62 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libstd-rust-dev amd64 1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04 [36.8 MB]
Get:63 http://archive.ubuntu.com/ubuntu focal/main amd64 libyaml-dev amd64 0.2.2-1 [58.2 kB]
Get:64 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 rustc amd64 1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04 [2967 kB]
Get:65 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 uuid-dev amd64 2.34-0.1ubuntu9.3 [33.6 kB]
Fetched 136 MB in 2min 1s (1124 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 58487 files and directories currently installed.)
Preparing to unpack .../libc6_2.31-0ubuntu9.9_amd64.deb ...
Unpacking libc6:amd64 (2.31-0ubuntu9.9) over (2.31-0ubuntu9.2) ...
Setting up libc6:amd64 (2.31-0ubuntu9.9) ...
(Reading database ... 58487 files and directories currently installed.)
Preparing to unpack .../libncursesw6_6.2-0ubuntu2.1_amd64.deb ...
Unpacking libncursesw6:amd64 (6.2-0ubuntu2.1) over (6.2-0ubuntu2) ...
Preparing to unpack .../libncurses6_6.2-0ubuntu2.1_amd64.deb ...
Unpacking libncurses6:amd64 (6.2-0ubuntu2.1) over (6.2-0ubuntu2) ...
Preparing to unpack .../libtinfo6_6.2-0ubuntu2.1_amd64.deb ...
Unpacking libtinfo6:amd64 (6.2-0ubuntu2.1) over (6.2-0ubuntu2) ...
Setting up libtinfo6:amd64 (6.2-0ubuntu2.1) ...
(Reading database ... 58487 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.34-0.1ubuntu9.3_amd64.deb ...
Unpacking libuuid1:amd64 (2.34-0.1ubuntu9.3) over (2.34-0.1ubuntu9.1) ...
Setting up libuuid1:amd64 (2.34-0.1ubuntu9.3) ...
(Reading database ... 58487 files and directories currently installed.)
Preparing to unpack .../zlib1g_1%3a1.2.11.dfsg-2ubuntu1.5_amd64.deb ...
Unpacking zlib1g:amd64 (1:1.2.11.dfsg-2ubuntu1.5) over (1:1.2.11.dfsg-2ubuntu1.2) ...
Setting up zlib1g:amd64 (1:1.2.11.dfsg-2ubuntu1.5) ...
(Reading database ... 58487 files and directories currently installed.)
Preparing to unpack .../00-libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1f-1ubuntu2.18) over (1.1.1f-1ubuntu2.5) ...
Selecting previously unselected package m4.
Preparing to unpack .../01-m4_1.4.18-4_amd64.deb ...
Unpacking m4 (1.4.18-4) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../02-autoconf_2.69-11.1_all.deb ...
Unpacking autoconf (2.69-11.1) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../03-autotools-dev_20180224.1_all.deb ...
Unpacking autotools-dev (20180224.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../04-automake_1%3a1.16.1-4ubuntu6_all.deb ...
Unpacking automake (1:1.16.1-4ubuntu6) ...
Selecting previously unselected package binutils-common:amd64.
Preparing to unpack .../05-binutils-common_2.34-6ubuntu1.5_amd64.deb ...
Unpacking binutils-common:amd64 (2.34-6ubuntu1.5) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../06-libbinutils_2.34-6ubuntu1.5_amd64.deb ...
Unpacking libbinutils:amd64 (2.34-6ubuntu1.5) ...
Selecting previously unselected package libctf-nobfd0:amd64.
Preparing to unpack .../07-libctf-nobfd0_2.34-6ubuntu1.5_amd64.deb ...
Unpacking libctf-nobfd0:amd64 (2.34-6ubuntu1.5) ...
Selecting previously unselected package libctf0:amd64.
Preparing to unpack .../08-libctf0_2.34-6ubuntu1.5_amd64.deb ...
Unpacking libctf0:amd64 (2.34-6ubuntu1.5) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../09-binutils-x86-64-linux-gnu_2.34-6ubuntu1.5_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.34-6ubuntu1.5) ...
Selecting previously unselected package binutils.
Preparing to unpack .../10-binutils_2.34-6ubuntu1.5_amd64.deb ...
Unpacking binutils (2.34-6ubuntu1.5) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../11-libc-dev-bin_2.31-0ubuntu9.9_amd64.deb ...
Unpacking libc-dev-bin (2.31-0ubuntu9.9) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../12-linux-libc-dev_5.4.0-149.166_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.4.0-149.166) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../13-libcrypt-dev_1%3a4.4.10-10ubuntu4_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../14-libc6-dev_2.31-0ubuntu9.9_amd64.deb ...
Unpacking libc6-dev:amd64 (2.31-0ubuntu9.9) ...
Selecting previously unselected package gcc-9-base:amd64.
Preparing to unpack .../15-gcc-9-base_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking gcc-9-base:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package libisl22:amd64.
Preparing to unpack .../16-libisl22_0.22.1-1_amd64.deb ...
Unpacking libisl22:amd64 (0.22.1-1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../17-libmpc3_1.1.0-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.1.0-1) ...
Selecting previously unselected package cpp-9.
Preparing to unpack .../18-cpp-9_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking cpp-9 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../19-cpp_4%3a9.3.0-1ubuntu2_amd64.deb ...
Unpacking cpp (4:9.3.0-1ubuntu2) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../20-libcc1-0_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libcc1-0:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../21-libgomp1_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libgomp1:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../22-libitm1_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libitm1:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../23-libatomic1_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libatomic1:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libasan5:amd64.
Preparing to unpack .../24-libasan5_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking libasan5:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../25-liblsan0_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking liblsan0:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../26-libtsan0_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libtsan0:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../27-libubsan1_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libubsan1:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../28-libquadmath0_10.3.0-1ubuntu1~20.04_amd64.deb ...
Unpacking libquadmath0:amd64 (10.3.0-1ubuntu1~20.04) ...
Selecting previously unselected package libgcc-9-dev:amd64.
Preparing to unpack .../29-libgcc-9-dev_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking libgcc-9-dev:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package gcc-9.
Preparing to unpack .../30-gcc-9_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking gcc-9 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../31-gcc_4%3a9.3.0-1ubuntu2_amd64.deb ...
Unpacking gcc (4:9.3.0-1ubuntu2) ...
Selecting previously unselected package libstdc++-9-dev:amd64.
Preparing to unpack .../32-libstdc++-9-dev_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking libstdc++-9-dev:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package g++-9.
Preparing to unpack .../33-g++-9_9.4.0-1ubuntu1~20.04.1_amd64.deb ...
Unpacking g++-9 (9.4.0-1ubuntu1~20.04.1) ...
Selecting previously unselected package g++.
Preparing to unpack .../34-g++_4%3a9.3.0-1ubuntu2_amd64.deb ...
Unpacking g++ (4:9.3.0-1ubuntu2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../35-libdpkg-perl_1.19.7ubuntu3.2_all.deb ...
Unpacking libdpkg-perl (1.19.7ubuntu3.2) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../36-dpkg-dev_1.19.7ubuntu3.2_all.deb ...
Unpacking dpkg-dev (1.19.7ubuntu3.2) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../37-build-essential_12.8ubuntu1.1_amd64.deb ...
Unpacking build-essential (12.8ubuntu1.1) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../38-libfakeroot_1.24-1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.24-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../39-fakeroot_1.24-1_amd64.deb ...
Unpacking fakeroot (1.24-1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../40-libalgorithm-diff-perl_1.19.03-2_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-2) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../41-libalgorithm-diff-xs-perl_0.04-6_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-6) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../42-libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../43-libfile-fcntllock-perl_0.22-3build4_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3build4) ...
Selecting previously unselected package libgdbm-dev:amd64.
Preparing to unpack .../44-libgdbm-dev_1.18.1-5_amd64.deb ...
Unpacking libgdbm-dev:amd64 (1.18.1-5) ...
Selecting previously unselected package libncurses-dev:amd64.
Preparing to unpack .../45-libncurses-dev_6.2-0ubuntu2.1_amd64.deb ...
Unpacking libncurses-dev:amd64 (6.2-0ubuntu2.1) ...
Selecting previously unselected package libncurses5-dev:amd64.
Preparing to unpack .../46-libncurses5-dev_6.2-0ubuntu2.1_amd64.deb ...
Unpacking libncurses5-dev:amd64 (6.2-0ubuntu2.1) ...
Selecting previously unselected package libreadline-dev:amd64.
Preparing to unpack .../47-libreadline-dev_8.0-4_amd64.deb ...
Unpacking libreadline-dev:amd64 (8.0-4) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../48-libssl-dev_1.1.1f-1ubuntu2.18_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1f-1ubuntu2.18) ...
Selecting previously unselected package libstd-rust-1.65:amd64.
Preparing to unpack .../49-libstd-rust-1.65_1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04_amd64.deb ...
Unpacking libstd-rust-1.65:amd64 (1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../50-manpages-dev_5.05-1_all.deb ...
Unpacking manpages-dev (5.05-1) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../51-zlib1g-dev_1%3a1.2.11.dfsg-2ubuntu1.5_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu1.5) ...
Selecting previously unselected package libdb5.3-dev.
Preparing to unpack .../52-libdb5.3-dev_5.3.28+dfsg1-0.6ubuntu2_amd64.deb ...
Unpacking libdb5.3-dev (5.3.28+dfsg1-0.6ubuntu2) ...
Selecting previously unselected package libdb-dev:amd64.
Preparing to unpack .../53-libdb-dev_1%3a5.3.21~exp1ubuntu2_amd64.deb ...
Unpacking libdb-dev:amd64 (1:5.3.21~exp1ubuntu2) ...
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack .../54-libffi-dev_3.3-4_amd64.deb ...
Unpacking libffi-dev:amd64 (3.3-4) ...
Selecting previously unselected package libstd-rust-dev:amd64.
Preparing to unpack .../55-libstd-rust-dev_1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04_amd64.deb ...
Unpacking libstd-rust-dev:amd64 (1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04) ...
Selecting previously unselected package libyaml-dev:amd64.
Preparing to unpack .../56-libyaml-dev_0.2.2-1_amd64.deb ...
Unpacking libyaml-dev:amd64 (0.2.2-1) ...
Selecting previously unselected package rustc.
Preparing to unpack .../57-rustc_1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04_amd64.deb ...
Unpacking rustc (1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04) ...
Selecting previously unselected package uuid-dev:amd64.
Preparing to unpack .../58-uuid-dev_2.34-0.1ubuntu9.3_amd64.deb ...
Unpacking uuid-dev:amd64 (2.34-0.1ubuntu9.3) ...
Setting up manpages-dev (5.05-1) ...
Setting up libyaml-dev:amd64 (0.2.2-1) ...
Setting up libfile-fcntllock-perl (0.22-3build4) ...
Setting up libalgorithm-diff-perl (1.19.03-2) ...
Setting up libssl1.1:amd64 (1.1.1f-1ubuntu2.18) ...
Setting up binutils-common:amd64 (2.34-6ubuntu1.5) ...
Setting up linux-libc-dev:amd64 (5.4.0-149.166) ...
Setting up libctf-nobfd0:amd64 (2.34-6ubuntu1.5) ...
Setting up m4 (1.4.18-4) ...
Setting up libgomp1:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up libffi-dev:amd64 (3.3-4) ...
Setting up libfakeroot:amd64 (1.24-1) ...
Setting up fakeroot (1.24-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up autotools-dev (20180224.1) ...
Setting up libncurses6:amd64 (6.2-0ubuntu2.1) ...
Setting up libquadmath0:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up libssl-dev:amd64 (1.1.1f-1ubuntu2.18) ...
Setting up libmpc3:amd64 (1.1.0-1) ...
Setting up libatomic1:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up libncursesw6:amd64 (6.2-0ubuntu2.1) ...
Setting up libdpkg-perl (1.19.7ubuntu3.2) ...
Setting up autoconf (2.69-11.1) ...
Setting up libubsan1:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up libstd-rust-1.65:amd64 (1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04) ...
Setting up libdb5.3-dev (5.3.28+dfsg1-0.6ubuntu2) ...
Setting up libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Setting up libisl22:amd64 (0.22.1-1) ...
Setting up libbinutils:amd64 (2.34-6ubuntu1.5) ...
Setting up libc-dev-bin (2.31-0ubuntu9.9) ...
Setting up libalgorithm-diff-xs-perl (0.04-6) ...
Setting up libcc1-0:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up liblsan0:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up libitm1:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up gcc-9-base:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libtsan0:amd64 (10.3.0-1ubuntu1~20.04) ...
Setting up libctf0:amd64 (2.34-6ubuntu1.5) ...
Setting up automake (1:1.16.1-4ubuntu6) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
Setting up libstd-rust-dev:amd64 (1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04) ...
Setting up libasan5:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Setting up libdb-dev:amd64 (1:5.3.21~exp1ubuntu2) ...
Setting up cpp-9 (9.4.0-1ubuntu1~20.04.1) ...
Setting up libc6-dev:amd64 (2.31-0ubuntu9.9) ...
Setting up libgdbm-dev:amd64 (1.18.1-5) ...
Setting up binutils-x86-64-linux-gnu (2.34-6ubuntu1.5) ...
Setting up libncurses-dev:amd64 (6.2-0ubuntu2.1) ...
Setting up binutils (2.34-6ubuntu1.5) ...
Setting up libreadline-dev:amd64 (8.0-4) ...
Setting up dpkg-dev (1.19.7ubuntu3.2) ...
Setting up libgcc-9-dev:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Setting up uuid-dev:amd64 (2.34-0.1ubuntu9.3) ...
Setting up zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu1.5) ...
Setting up cpp (4:9.3.0-1ubuntu2) ...
Setting up libncurses5-dev:amd64 (6.2-0ubuntu2.1) ...
Setting up gcc-9 (9.4.0-1ubuntu1~20.04.1) ...
Setting up libstdc++-9-dev:amd64 (9.4.0-1ubuntu1~20.04.1) ...
Setting up gcc (4:9.3.0-1ubuntu2) ...
Setting up g++-9 (9.4.0-1ubuntu1~20.04.1) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up rustc (1.65.0+dfsg0ubuntu1~llvm2-0ubuntu0.20.04) ...
Setting up build-essential (12.8ubuntu1.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

Processing triggers for man-db (2.9.1-1) ...
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get install ruby-build
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libc-ares2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
icu-devtools libicu-dev libicu66 libsqlite3-0 libsqlite3-dev libxml2 libxml2-dev libxslt1-dev libxslt1.1 rbenv
Suggested packages:
icu-doc sqlite3-doc pkg-config bison libtool
The following NEW packages will be installed:
icu-devtools libicu-dev libsqlite3-dev libxml2-dev libxslt1-dev rbenv ruby-build
The following packages will be upgraded:
libicu66 libsqlite3-0 libxml2 libxslt1.1
4 upgraded, 7 newly installed, 0 to remove and 236 not upgraded.
Need to get 21.2 MB of archives.
After this operation, 53.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libicu66 amd64 66.1-2ubuntu2.1 [8515 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libsqlite3-0 amd64 3.31.1-4ubuntu0.5 [549 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxml2 amd64 2.9.10+dfsg-5ubuntu0.20.04.6 [640 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 icu-devtools amd64 66.1-2ubuntu2.1 [189 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libicu-dev amd64 66.1-2ubuntu2.1 [9451 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libsqlite3-dev amd64 3.31.1-4ubuntu0.5 [697 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxml2-dev amd64 2.9.10+dfsg-5ubuntu0.20.04.6 [735 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxslt1.1 amd64 1.1.34-4ubuntu0.20.04.1 [151 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libxslt1-dev amd64 1.1.34-4ubuntu0.20.04.1 [219 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/universe amd64 rbenv all 1.1.1-1 [22.1 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/universe amd64 ruby-build all 20170726-1 [46.1 kB]
Fetched 21.2 MB in 13s (1669 kB/s)
(Reading database ... 64775 files and directories currently installed.)
Preparing to unpack .../00-libicu66_66.1-2ubuntu2.1_amd64.deb ...
Unpacking libicu66:amd64 (66.1-2ubuntu2.1) over (66.1-2ubuntu2) ...
Preparing to unpack .../01-libsqlite3-0_3.31.1-4ubuntu0.5_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.31.1-4ubuntu0.5) over (3.31.1-4ubuntu0.2) ...
Preparing to unpack .../02-libxml2_2.9.10+dfsg-5ubuntu0.20.04.6_amd64.deb ...
Unpacking libxml2:amd64 (2.9.10+dfsg-5ubuntu0.20.04.6) over (2.9.10+dfsg-5ubuntu0.20.04.1) ...
Selecting previously unselected package icu-devtools.
Preparing to unpack .../03-icu-devtools_66.1-2ubuntu2.1_amd64.deb ...
Unpacking icu-devtools (66.1-2ubuntu2.1) ...
Selecting previously unselected package libicu-dev:amd64.
Preparing to unpack .../04-libicu-dev_66.1-2ubuntu2.1_amd64.deb ...
Unpacking libicu-dev:amd64 (66.1-2ubuntu2.1) ...
Selecting previously unselected package libsqlite3-dev:amd64.
Preparing to unpack .../05-libsqlite3-dev_3.31.1-4ubuntu0.5_amd64.deb ...
Unpacking libsqlite3-dev:amd64 (3.31.1-4ubuntu0.5) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../06-libxml2-dev_2.9.10+dfsg-5ubuntu0.20.04.6_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.10+dfsg-5ubuntu0.20.04.6) ...
Preparing to unpack .../07-libxslt1.1_1.1.34-4ubuntu0.20.04.1_amd64.deb ...
Unpacking libxslt1.1:amd64 (1.1.34-4ubuntu0.20.04.1) over (1.1.34-4) ...
Selecting previously unselected package libxslt1-dev:amd64.
Preparing to unpack .../08-libxslt1-dev_1.1.34-4ubuntu0.20.04.1_amd64.deb ...
Unpacking libxslt1-dev:amd64 (1.1.34-4ubuntu0.20.04.1) ...
Selecting previously unselected package rbenv.
Preparing to unpack .../09-rbenv_1.1.1-1_all.deb ...
Unpacking rbenv (1.1.1-1) ...
Selecting previously unselected package ruby-build.
Preparing to unpack .../10-ruby-build_20170726-1_all.deb ...
Unpacking ruby-build (20170726-1) ...
Setting up ruby-build (20170726-1) ...
Setting up libicu66:amd64 (66.1-2ubuntu2.1) ...
Setting up libsqlite3-0:amd64 (3.31.1-4ubuntu0.5) ...
Setting up libsqlite3-dev:amd64 (3.31.1-4ubuntu0.5) ...
Setting up icu-devtools (66.1-2ubuntu2.1) ...
Setting up rbenv (1.1.1-1) ...
Setting up libicu-dev:amd64 (66.1-2ubuntu2.1) ...
Setting up libxml2:amd64 (2.9.10+dfsg-5ubuntu0.20.04.6) ...
Setting up libxml2-dev:amd64 (2.9.10+dfsg-5ubuntu0.20.04.6) ...
Setting up libxslt1.1:amd64 (1.1.34-4ubuntu0.20.04.1) ...
Setting up libxslt1-dev:amd64 (1.1.34-4ubuntu0.20.04.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$


9、作为 rbenv 插件,列出所有可用的 Ruby 版本,执行命令:rbenv install –list ,安装 Ruby rbx-3.82 到 ~/.rbenv/versions,执行命令:rbenv install rbx-3.82。安装失败。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ rbenv install --list
Available versions:
1.8.5-p52
1.8.5-p113
1.8.5-p114
1.8.5-p115
1.8.5-p231
1.8.6
1.8.6-p36
1.8.6-p110
1.8.6-p111
1.8.6-p114
1.8.6-p230
1.8.6-p286
1.8.6-p287
1.8.6-p368
1.8.6-p369
1.8.6-p383
1.8.6-p388
1.8.6-p398
1.8.6-p399
1.8.6-p420
1.8.7-preview1
1.8.7-preview2
1.8.7-preview3
1.8.7-preview4
1.8.7
1.8.7-p17
1.8.7-p22
1.8.7-p71
1.8.7-p72
1.8.7-p160
1.8.7-p173
1.8.7-p174
1.8.7-p248
1.8.7-p249
1.8.7-p299
1.8.7-p301
1.8.7-p302
1.8.7-p330
1.8.7-p334
1.8.7-p352
1.8.7-p357
1.8.7-p358
1.8.7-p370
1.8.7-p371
1.8.7-p373
1.8.7-p374
1.8.7-p375
1.9.0-0
1.9.0-1
1.9.0-2
1.9.0-3
1.9.0-4
1.9.0-5
1.9.1-preview1
1.9.1-preview2
1.9.1-rc1
1.9.1-rc2
1.9.1-p0
1.9.1-p129
1.9.1-p243
1.9.1-p376
1.9.1-p378
1.9.1-p429
1.9.1-p430
1.9.1-p431
1.9.2-preview1
1.9.2-preview3
1.9.2-rc1
1.9.2-rc2
1.9.2-p0
1.9.2-p136
1.9.2-p180
1.9.2-p290
1.9.2-p318
1.9.2-p320
1.9.2-p326
1.9.2-p330
1.9.3-dev
1.9.3-preview1
1.9.3-rc1
1.9.3-p0
1.9.3-p105
1.9.3-p125
1.9.3-p194
1.9.3-p286
1.9.3-p327
1.9.3-p362
1.9.3-p374
1.9.3-p385
1.9.3-p392
1.9.3-p426
1.9.3-p429
1.9.3-p448
1.9.3-p484
1.9.3-p545
1.9.3-p547
1.9.3-p550
1.9.3-p551
2.0.0-dev
2.0.0-preview1
2.0.0-preview2
2.0.0-rc1
2.0.0-rc2
2.0.0-p0
2.0.0-p195
2.0.0-p247
2.0.0-p353
2.0.0-p451
2.0.0-p481
2.0.0-p576
2.0.0-p594
2.0.0-p598
2.0.0-p643
2.0.0-p645
2.0.0-p647
2.0.0-p648
2.1.0-dev
2.1.0-preview1
2.1.0-preview2
2.1.0-rc1
2.1.0
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.1.6
2.1.7
2.1.8
2.1.9
2.1.10
2.2.0-dev
2.2.0-preview1
2.2.0-preview2
2.2.0-rc1
2.2.0
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.2.7
2.3.0-dev
2.3.0-preview1
2.3.0-preview2
2.3.0
2.3.1
2.3.2
2.3.3
2.3.4
2.4.0-dev
2.4.0-preview1
2.4.0-preview2
2.4.0-preview3
2.4.0-rc1
2.4.0
2.4.1
2.5.0-dev
jruby-1.5.6
jruby-1.6.3
jruby-1.6.4
jruby-1.6.5
jruby-1.6.5.1
jruby-1.6.6
jruby-1.6.7
jruby-1.6.7.2
jruby-1.6.8
jruby-1.7.0-preview1
jruby-1.7.0-preview2
jruby-1.7.0-rc1
jruby-1.7.0-rc2
jruby-1.7.0
jruby-1.7.1
jruby-1.7.2
jruby-1.7.3
jruby-1.7.4
jruby-1.7.5
jruby-1.7.6
jruby-1.7.7
jruby-1.7.8
jruby-1.7.9
jruby-1.7.10
jruby-1.7.11
jruby-1.7.12
jruby-1.7.13
jruby-1.7.14
jruby-1.7.15
jruby-1.7.16
jruby-1.7.16.1
jruby-1.7.16.2
jruby-1.7.17
jruby-1.7.18
jruby-1.7.19
jruby-1.7.20
jruby-1.7.20.1
jruby-1.7.21
jruby-1.7.22
jruby-1.7.23
jruby-1.7.24
jruby-1.7.25
jruby-1.7.26
jruby-1.7.27
jruby-9.0.0.0.pre1
jruby-9.0.0.0.pre2
jruby-9.0.0.0.rc1
jruby-9.0.0.0.rc2
jruby-9.0.0.0
jruby-9.0.1.0
jruby-9.0.3.0
jruby-9.0.4.0
jruby-9.0.5.0
jruby-9.1.0.0-dev
jruby-9.1.0.0
jruby-9.1.1.0
jruby-9.1.2.0
jruby-9.1.3.0
jruby-9.1.4.0
jruby-9.1.5.0
jruby-9.1.6.0
jruby-9.1.7.0
jruby-9.1.8.0
jruby-9.1.9.0-dev
jruby-9.1.9.0
jruby-9.1.10.0
jruby-9.1.11.0
jruby-9.1.12.0
maglev-1.0.0
maglev-1.1.0-dev
maglev-2.0.0-dev
mruby-dev
mruby-1.0.0
mruby-1.1.0
mruby-1.2.0
rbx-2.2.2
rbx-2.2.3
rbx-2.2.4
rbx-2.2.5
rbx-2.2.6
rbx-2.2.7
rbx-2.2.8
rbx-2.2.9
rbx-2.2.10
rbx-2.3.0
rbx-2.4.0
rbx-2.4.1
rbx-2.5.0
rbx-2.5.1
rbx-2.5.2
rbx-2.5.3
rbx-2.5.4
rbx-2.5.5
rbx-2.5.6
rbx-2.5.7
rbx-2.5.8
rbx-2.6
rbx-2.7
rbx-2.8
rbx-2.9
rbx-2.10
rbx-2.11
rbx-2.71828182
rbx-3.0
rbx-3.1
rbx-3.2
rbx-3.3
rbx-3.4
rbx-3.5
rbx-3.6
rbx-3.7
rbx-3.8
rbx-3.9
rbx-3.10
rbx-3.11
rbx-3.12
rbx-3.13
rbx-3.14
rbx-3.15
rbx-3.16
rbx-3.17
rbx-3.18
rbx-3.19
rbx-3.20
rbx-3.21
rbx-3.22
rbx-3.23
rbx-3.24
rbx-3.25
rbx-3.26
rbx-3.27
rbx-3.28
rbx-3.29
rbx-3.30
rbx-3.31
rbx-3.32
rbx-3.33
rbx-3.34
rbx-3.35
rbx-3.36
rbx-3.37
rbx-3.38
rbx-3.39
rbx-3.40
rbx-3.41
rbx-3.42
rbx-3.43
rbx-3.44
rbx-3.45
rbx-3.46
rbx-3.47
rbx-3.48
rbx-3.49
rbx-3.50
rbx-3.51
rbx-3.52
rbx-3.53
rbx-3.54
rbx-3.55
rbx-3.56
rbx-3.57
rbx-3.58
rbx-3.59
rbx-3.60
rbx-3.61
rbx-3.62
rbx-3.63
rbx-3.64
rbx-3.65
rbx-3.66
rbx-3.67
rbx-3.68
rbx-3.69
rbx-3.70
rbx-3.71
rbx-3.72
rbx-3.73
rbx-3.74
rbx-3.75
rbx-3.76
rbx-3.77
rbx-3.78
rbx-3.79
rbx-3.80
rbx-3.81
rbx-3.82
ree-1.8.7-2011.03
ree-1.8.7-2011.12
ree-1.8.7-2012.01
ree-1.8.7-2012.02
topaz-dev
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ rbenv install rbx-3.82
Downloading rubinius-3.82.tar.bz2...
-&gt; https://dqw8nmjcqpjn7.cloudfront.net/53abb85219980d7307a762660e1d509cd74beccbcf4d46979ddd0749e77a1401
Installing rubinius-3.82...

BUILD FAILED (Ubuntu 20.04 using ruby-build 20170726)

Inspect or clean up the working tree at /tmp/ruby-build.20230530173243.9015
Results logged to /tmp/ruby-build.20230530173243.9015.log

Last 10 log lines:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/ruby-build.20230530173243.9015/rubinius-3.82/vendor/bundle/ruby/2.7.0/gems/rubinius-melbourne-3.9/ext/rubinius/code/melbourne
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20230530-9078-1ds9pho.rb extconf.rb ''
extconf failedno implicit conversion of nil into String

Gem files will remain installed in /tmp/ruby-build.20230530173243.9015/rubinius-3.82/vendor/bundle/ruby/2.7.0/gems/rubinius-melbourne-3.9 for inspection.
Results logged to /tmp/ruby-build.20230530173243.9015/rubinius-3.82/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/rubinius-melbourne-3.9/gem_make.out
An error occurred while installing rubinius-melbourne (3.9), and Bundler cannot continue.
Make sure that `gem install rubinius-melbourne -v '3.9'` succeeds before bundling.


10、决定卸载 Ruby 2.7


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get remove ruby-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libc-ares2
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
ruby-full
0 upgraded, 0 newly installed, 1 to remove and 236 not upgraded.
After this operation, 19.5 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 65638 files and directories currently installed.)
Removing ruby-full (1:2.7+1) ...
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ sudo apt-get remove ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-lato javascript-common libc-ares2 libjs-jquery ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit
ruby-xmlrpc ruby2.7-doc rubygems-integration unzip zip
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libruby2.7 rake rbenv ri ruby ruby-dev ruby2.7 ruby2.7-dev
0 upgraded, 0 newly installed, 8 to remove and 236 not upgraded.
After this operation, 19.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 65634 files and directories currently installed.)
Removing ruby-dev:amd64 (1:2.7+1) ...
Removing ruby2.7-dev:amd64 (2.7.0-5ubuntu1.11) ...
Removing rbenv (1.1.1-1) ...
Removing ri (1:2.7+1) ...
Removing ruby2.7 (2.7.0-5ubuntu1.11) ...
Removing libruby2.7:amd64 (2.7.0-5ubuntu1.11) ...
Removing rake (13.0.1-4) ...
Removing ruby (1:2.7+1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$ ruby -v
-bash: /usr/bin/ruby: No such file or directory
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/shopify-app$


11、作为 rbenv 插件,列出所有可用的 Ruby 版本,执行命令:rbenv install –list ,提示命令不存在,重新安装 rbenv。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ rbenv install --list

Command 'rbenv' not found, but can be installed with:

sudo apt install rbenv
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ sudo apt install rbenv


12、作为 rbenv 插件,安装 Ruby rbx-3.82 到 ~/.rbenv/versions,执行命令:rbenv install rbx-3.82。安装失败,报错:gem install rubinius-melbourne -v ‘3.9’


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ rbenv install rbx-3.82
Downloading rubinius-3.82.tar.bz2...
-&gt; https://dqw8nmjcqpjn7.cloudfront.net/53abb85219980d7307a762660e1d509cd74beccbcf4d46979ddd0749e77a1401
Installing rubinius-3.82...

BUILD FAILED (Ubuntu 20.04 using ruby-build 20170726)

Inspect or clean up the working tree at /tmp/ruby-build.20230531093842.693
Results logged to /tmp/ruby-build.20230531093842.693.log

Last 10 log lines:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/ruby-build.20230531093842.693/rubinius-3.82/vendor/bundle/ruby/2.7.0/gems/rubinius-melbourne-3.9/ext/rubinius/code/melbourne
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20230531-756-1f7i4tc.rb extconf.rb ''
extconf failedno implicit conversion of nil into String

Gem files will remain installed in /tmp/ruby-build.20230531093842.693/rubinius-3.82/vendor/bundle/ruby/2.7.0/gems/rubinius-melbourne-3.9 for inspection.
Results logged to /tmp/ruby-build.20230531093842.693/rubinius-3.82/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/rubinius-melbourne-3.9/gem_make.out
An error occurred while installing rubinius-melbourne (3.9), and Bundler cannot continue.
Make sure that `gem install rubinius-melbourne -v '3.9'` succeeds before bundling.


13、执行命令:sudo gem install rubinius-melbourne -v ‘3.9’ ,报错:make: *** [Makefile:45: encoding_compat.o] Error 1


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ sudo gem install rubinius-melbourne -v '3.9'
[sudo] password for wangqiang:
Fetching rubinius-melbourne-3.9.gem
Building native extensions. This could take a while...
ERROR: Error installing rubinius-melbourne:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.7.0/gems/rubinius-melbourne-3.9/ext/rubinius/code/melbourne
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20230531-774-1d47cv.rb extconf.rb

current directory: /var/lib/gems/2.7.0/gems/rubinius-melbourne-3.9/ext/rubinius/code/melbourne
make "DESTDIR=" clean

current directory: /var/lib/gems/2.7.0/gems/rubinius-melbourne-3.9/ext/rubinius/code/melbourne
make "DESTDIR="
compiling node_types.cpp
node_types.cpp: In function ‘const char* melbourne_1685498084::get_node_type_string(melbourne_1685498084::node_type)’:
node_types.cpp:264:66: warning: ‘%d’ directive output truncated writing between 3 and 10 bytes into a region of size 1 [-Wformat-truncation=]
264 | snprintf(msg, NODE_STRING_MESSAGE_LEN, "unknown node type: %d", node);
| ^~
node_types.cpp:264:46: note: directive argument in the range [121, 2147483647]
264 | snprintf(msg, NODE_STRING_MESSAGE_LEN, "unknown node type: %d", node);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from node_types.cpp:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 23 and 30 bytes into a destination of size 20
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compiling encoding_compat.cpp
In file included from encoding_compat.hpp:7,
from encoding_compat.cpp:1:
melbourne.hpp:28:10: fatal error: ruby.h: No such file or directory
28 | #include "ruby.h"
| ^~~~~~~~
compilation terminated.
make: *** [Makefile:45: encoding_compat.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.7.0/gems/rubinius-melbourne-3.9 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/rubinius-melbourne-3.9/gem_make.out


14、决定更新 gem 至最新版本。


wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ bundle-update
bundle-update: command not found
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ sudo gem install bundler
[sudo] password for wangqiang:
Sorry, try again.
[sudo] password for wangqiang:
Fetching bundler-2.4.13.gem
Successfully installed bundler-2.4.13
Parsing documentation for bundler-2.4.13
Installing ri documentation for bundler-2.4.13
Done installing documentation for bundler after 0 seconds
1 gem installed
wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot$ bundle-update
bundle-update: command not found


15、在应用设置中,重置 Ubuntu-20.04 后,不再基于包管理器安装 Ruby ,而是基于 rbenv-installer 脚本在您的系统上幂等地安装或更新 rbenv。 如果检测到 Homebrew,安装将使用 brew install/upgrade 继续。 否则,rbenv 安装在 ~/.rbenv 下。 此外,如果 rbenv install 尚不可用,也会安装 ruby-build。如图2
基于 rbenv-installer 脚本在您的系统上幂等地安装或更新 rbenv

图2



wangqiang@DESKTOP-QLPK8QM:~$ sudo apt-get update
wangqiang@DESKTOP-QLPK8QM:~$ wget -q https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer -O- | bash
Installing rbenv with git...
Initialized empty Git repository in /home/wangqiang/.rbenv/.git/
Updating origin
remote: Enumerating objects: 3176, done.
remote: Counting objects: 100% (333/333), done.
remote: Compressing objects: 100% (192/192), done.
remote: Total 3176 (delta 179), reused 252 (delta 129), pack-reused 2843
Receiving objects: 100% (3176/3176), 638.26 KiB | 184.00 KiB/s, done.
Resolving deltas: 100% (1967/1967), done.
From https://github.com/rbenv/rbenv
* [new branch] master -&gt; origin/master
* [new tag] v0.1.0 -&gt; v0.1.0
* [new tag] v0.1.1 -&gt; v0.1.1
* [new tag] v0.1.2 -&gt; v0.1.2
* [new tag] v0.2.0 -&gt; v0.2.0
* [new tag] v0.2.1 -&gt; v0.2.1
* [new tag] v0.3.0 -&gt; v0.3.0
* [new tag] v0.4.0 -&gt; v0.4.0
* [new tag] v1.0.0 -&gt; v1.0.0
* [new tag] v1.1.0 -&gt; v1.1.0
* [new tag] v1.1.1 -&gt; v1.1.1
* [new tag] v1.1.2 -&gt; v1.1.2
* [new tag] v1.2.0 -&gt; v1.2.0
Branch 'master' set up to track remote branch 'master' from 'origin'.
Already on 'master'

Installing ruby-build with git...
Cloning into '/home/wangqiang/.rbenv/plugins/ruby-build'...
remote: Enumerating objects: 13982, done.
remote: Counting objects: 100% (132/132), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 13982 (delta 83), reused 118 (delta 78), pack-reused 13850
Receiving objects: 100% (13982/13982), 2.80 MiB | 46.00 KiB/s, done.
Resolving deltas: 100% (9566/9566), done.

All done!
Note that this installer does NOT edit your shell configuration files:
1. Run `~/.rbenv/bin/rbenv init' to view instructions on how to configure rbenv for your shell.
2. Launch a new terminal window after editing shell configuration files.
3. (Optional) Run the doctor command to verify the installation:
wget -q "https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-doctor" -O- | bash



16、运行 `~/.rbenv/bin/rbenv init’ 查看有关如何为您的 shell 配置 rbenv 的说明。添加 eval “$(/home/wangqiang/.rbenv/bin/rbenv init – bash)” 至 ~/.bashrc,然后重启终端。


wangqiang@DESKTOP-QLPK8QM:~$ ~/.rbenv/bin/rbenv init
# Please add the following line to your `~/.bashrc' file,
# then restart your terminal.

eval "$(/home/wangqiang/.rbenv/bin/rbenv init - bash)"

wangqiang@DESKTOP-QLPK8QM:~$ echo 'eval "$(/home/wangqiang/.rbenv/bin/rbenv init - bash)"' &gt;&gt; ~/.bashrc
wangqiang@DESKTOP-QLPK8QM:~$


17、编辑 shell 配置文件后启动一个新的终端窗口。如图3
编辑 shell 配置文件后启动一个新的终端窗口

图3

18、您可以使用以下命令验证 rbenv 安装的状态,验证通过。


wangqiang@DESKTOP-QLPK8QM:~$ wget -q https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-doctor -O- | bash
Checking for `rbenv' in PATH: /home/wangqiang/.rbenv/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /home/wangqiang/.rbenv/plugins/ruby-build/bin/rbenv-install (ruby-build 20230512)
Counting installed Ruby versions: none
There aren't any Ruby versions installed under `/home/wangqiang/.rbenv/versions'.
You can install Ruby versions like so: rbenv install 3.2.2
Auditing installed plugins: OK


19、执行命令: rbenv install 3.2.2 ,安装失败,报错:No C compiler found, please specify one with the environment variable CC,or configure with an explicit configuration target.


wangqiang@DESKTOP-QLPK8QM:~$ rbenv install --list
3.0.6
3.1.4
3.2.2
jruby-9.4.2.0
mruby-3.2.0
picoruby-3.0.0
truffleruby-22.3.1
truffleruby+graalvm-22.3.1

Only latest stable releases for each Ruby implementation are shown.
Use 'rbenv install --list-all / -L' to show all local versions.
wangqiang@DESKTOP-QLPK8QM:~$ rbenv install 3.2.2
To follow progress, use 'tail -f /tmp/ruby-build.20230602104329.795.log' or pass --verbose
No system openssl version was found, ensure openssl headers are installed (https://github.com/rbenv/ruby-build/wiki#suggested-build-environment)
Downloading openssl-3.1.0.tar.gz...
-&gt; https://dqw8nmjcqpjn7.cloudfront.net/aaa925ad9828745c4cad9d9efeb273deca820f2cdcf2c3ac7d7c1212b7c497b4
Installing openssl-3.1.0...

BUILD FAILED (Ubuntu 20.04 using ruby-build 20230512)

Inspect or clean up the working tree at /tmp/ruby-build.20230602104329.795.clWddR
Results logged to /tmp/ruby-build.20230602104329.795.log

Last 10 log lines:

/tmp/ruby-build.20230602104329.795.clWddR/openssl-3.1.0 /tmp/ruby-build.20230602104329.795.clWddR ~

Failure! build file wasn't produced.
Please read INSTALL.md and associated NOTES-* files. You may also have to
look over your available compiler tool chain or change your configuration.

ERROR!
No C compiler found, please specify one with the environment variable CC,
or configure with an explicit configuration target.


20、在下载并尝试从源代码编译 Ruby 之前,ruby-build 通常不会验证系统依赖项是否存在。 请确保所有必需的库(例如构建工具和开发标头)已存在于您的系统中。按照建议的构建环境中的说明进行操作。安装依赖项。


wangqiang@DESKTOP-QLPK8QM:~$ sudo apt-get install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev



21、重新安装 Ruby 3.2.2,设置 Ruby 版本以完成安装并开始使用 Ruby,为这台机器设置默认的 Ruby 版本。如图4
重新安装 Ruby 3.2.2,设置 Ruby 版本以完成安装并开始使用 Ruby,为这台机器设置默认的 Ruby 版本

图4



wangqiang@DESKTOP-QLPK8QM:~$ rbenv install 3.2.2
To follow progress, use 'tail -f /tmp/ruby-build.20230602105714.6877.log' or pass --verbose
Downloading ruby-3.2.2.tar.gz...
-&gt; https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
Installing ruby-3.2.2...
Installed ruby-3.2.2 to /home/wangqiang/.rbenv/versions/3.2.2

NOTE: to activate this Ruby version as the new default, run: rbenv global 3.2.2
wangqiang@DESKTOP-QLPK8QM:~$ rbenv global 3.2.2
wangqiang@DESKTOP-QLPK8QM:~$ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
wangqiang@DESKTOP-QLPK8QM:~$


22、继续安装 gems


wangqiang@DESKTOP-QLPK8QM:~$ gem install bundler
Fetching bundler-2.4.13.gem
Successfully installed bundler-2.4.13
Parsing documentation for bundler-2.4.13
Installing ri documentation for bundler-2.4.13
Done installing documentation for bundler after 0 seconds
1 gem installed

A new release of RubyGems is available: 3.4.10 → 3.4.13!
Run `gem update --system 3.4.13` to update your installation.



23、参考 : 使用以下命令安装在 Linux 上安装和运行 Shopify CLI 的所有要求,包含(Ruby development environment (ruby-dev / ruby-devel)、Git、cURL、GCC、g++、Make)。Node.js 与 Ruby 除外。


wangqiang@DESKTOP-QLPK8QM:~$ sudo apt update &amp;&amp; sudo apt upgrade
wangqiang@DESKTOP-QLPK8QM:~$ sudo apt install curl gcc g++ make
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:9.3.0-1ubuntu2).
g++ set to manually installed.
gcc is already the newest version (4:9.3.0-1ubuntu2).
gcc set to manually installed.
make is already the newest version (4.2.1-1.2).
make set to manually installed.
curl is already the newest version (7.68.0-1ubuntu2.18).
curl set to manually installed.
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
wangqiang@DESKTOP-QLPK8QM:~$ sudo apt install ruby-dev
wangqiang@DESKTOP-QLPK8QM:~$ sudo apt install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.25.1-1ubuntu3.11).
git set to manually installed.
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


24、安装和运行 Shopify CLI 的所有要求全部准备完毕且满足要求。]]>
https://www.shuijingwanwq.com/2023/06/27/7783/feed/ 2
执行:npm install 时,报错:If you are behind a proxy, please make sure that the ‘proxy’ config is set properly. https://www.shuijingwanwq.com/2023/02/28/7439/ https://www.shuijingwanwq.com/2023/02/28/7439/#respond Tue, 28 Feb 2023 01:20:22 +0000 https://www.shuijingwanwq.com/?p=7439 浏览量: 341

1、执行:npm install 时,大概执行了半小时左右,报错:If you are behind a proxy, please make sure that the ‘proxy’ config is set properly. 。如图1

执行:npm install 时,大概执行了半小时左右,报错:If you are behind a proxy, please make sure that the 'proxy' config is set properly.

图1

PS E:\wwwroot\shopify-theme> npm install -g @shopify/cli@3.32.0 @shopify/theme@3.32.0
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/@shopify%2fplugin-ngrok failed, reason: Client network socket disconnected before secure TLS connection was established
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2023-02-16T06_06_14_242Z-debug-0.log
PS E:\wwwroot\shopify-theme>
PS E:\wwwroot\shopify-theme>
PS E:\wwwroot\shopify-theme>
PS E:\wwwroot\shopify-theme> npm install -g @shopify/cli@3.32.0 @shopify/theme@3.32.0
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/@shopify%2fplugin-ngrok failed, reason: connect ECONNREFUSED 127.0.0.1:8888
npm ERR!     at ClientRequest.<anonymous> (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:390:28)
npm ERR!     at onerror (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21)
ex.js:136:17)
npm ERR!     at runMicrotasks (<anonymous>)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR!  FetchError: request to https://registry.npmjs.org/@shopify%2fplugin-ngrok failed, reason: connect ECONNREFUSED 127.0.0.1:8888
npm ERR!     at ClientRequest.<anonymous> (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:390:28)
npm ERR!     at onerror (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21)
npm ERR!     at callbackError (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17)
npm ERR!     at runMicrotasks (<anonymous>)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 8888,
npm ERR!   type: 'system',
npm ERR!   requiredBy: 'node_modules/@shopify/cli'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2023-02-16T07_23_47_970Z-debug-0.log
PS E:\wwwroot\shopify-theme> npm install -g @shopify/cli@3.32.0 @shopify/theme@3.32.0
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/@shopify%2fplugin-ngrok failed, reason: connect ECONNREFUSED 127.0.0.1:8888
npm ERR!     at ClientRequest.<anonymous> (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:390:28)
npm ERR!     at onerror (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21)
npm ERR!     at callbackError (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17)
npm ERR!     at runMicrotasks (<anonymous>)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR!  FetchError: request to https://registry.npmjs.org/@shopify%2fplugin-ngrok failed, reason: connect ECONNREFUSED 127.0.0.1:8888
npm ERR!     at ClientRequest.<anonymous> (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR!     at ClientRequest.emit (node:events:390:28)
npm ERR!     at onerror (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21)
npm ERR!     at callbackError (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17)
npm ERR!     at runMicrotasks (<anonymous>)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 8888,
npm ERR!   type: 'system',
npm ERR!   requiredBy: 'node_modules/@shopify/cli'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2023-02-17T03_04_00_835Z-debug-0.log

2、检查 NPM 代理设置,其值为:https://127.0.0.1:8888/

PS E:\wwwroot\shopify-theme> npm config get proxy
https://127.0.0.1:8888/

3、决定删除掉 NPM 代理设置。

 

PS E:\wwwroot\shopify-theme> npm config rm proxy
PS E:\wwwroot\shopify-theme> npm config rm https-proxy
PS E:\wwwroot\shopify-theme> npm config get proxy
null
PS E:\wwwroot\shopify-theme>

4、再次执行安装命令,不再报错。

PS E:\wwwroot\shopify-theme> npm install -g @shopify/cli@3.32.0 @shopify/theme@3.32.0
npm WARN deprecated @oclif/screen@3.0.4: Deprecated in favor of @oclif/core
npm WARN deprecated @oclif/screen@3.0.4: Deprecated in favor of @oclif/core

added 956 packages in 1m

111 packages are looking for funding
  run `npm fund` for details
PS E:\wwwroot\shopify-theme> shopify version
Current Shopify CLI version: 3.32.0
💡 Version 3.43.0 available!
PS E:\wwwroot\shopify-theme>

 

 

]]>
https://www.shuijingwanwq.com/2023/02/28/7439/feed/ 0
在 Windows 10 专业版中升级 Shopify CLI,从 2.x 迁移到 3.x https://www.shuijingwanwq.com/2023/02/11/7408/ https://www.shuijingwanwq.com/2023/02/11/7408/#respond Sat, 11 Feb 2023 02:59:38 +0000 https://www.shuijingwanwq.com/?p=7408 浏览量: 90 1、参考:在 Windows 10 专业版中安装 Shopify CLI 3.0(基于 Node.js) 。安装完毕后,提示 新版本的 Shopify CLI 可用! 您的版本是 2.15.6,最新版本是 2.34.0。要升级,请按照您正在使用的包管理器的说明进行操作:https://shopify.dev/tools/cli/troubleshooting#upgrade-shopify-cli 2、要将 Shopify CLI 3.x 升级到最新版本,请使用升级命令:npm run shopify upgrade。报错:npm ERR! enoent ENOENT: no such file or directory, open ‘E:\wwwroot\package.json’。


PS E:\wwwroot> npm run shopify upgrade
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path E:\wwwroot/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'E:\wwwroot\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2023-02-03T06_14_43_909Z-debug-0.log


3、升级命令失败,则您可能使用的是以前版本的 Shopify CLI。 要使用最新版本的 Shopify CLI 处理现有应用,您需要迁移您的应用。 或者,您可以创建一个使用 Shopify CLI 作为依赖项的新应用。 4、决定迁移,参考:https://shopify.dev/themes/tools/cli/migrate#migrate-to-shopify-cli-3-x 。将您的模版开发环境迁移到 Shopify CLI 3.x。 5、第 1 步:安装的新要求。除了 Shopify CLI 2.x 的要求外,Shopify CLI 3.x 还需要 Node.js 14.17.0 或更高版本。确认要求全部满足。 6、第 2 步:卸载 Shopify CLI 2.x。Shopify CLI 可以使用您用于安装它的相同包管理器从您的系统中删除。之前的包管理器是 RubyGems 。如图1
第 2 步:卸载 Shopify CLI 2.x。Shopify CLI 可以使用您用于安装它的相同包管理器从您的系统中删除。之前的包管理器是 RubyGems

图1

7、执行:gem uninstall shopify-cli ,卸载 Shopify CLI 2.x。如图2
执行:gem uninstall shopify-cli ,卸载 Shopify CLI 2.x

图2



PS C:\Users\Lenovo> gem uninstall shopify-cli
Remove executables:
        shopify

in addition to the gem? [Yn]  Y
Removing shopify
Successfully uninstalled shopify-cli-2.15.6


8、第 3 步:安装 Shopify CLI 3.x。Shopify CLI 作为一组 Node.js 包进行管理,包含: @shopify/cli 、 @shopify/theme 。可在 Windows 上全局安装这些包。不再支持 apt、Yum 和 RubyGems 安装。要为主题安装 Shopify CLI,请使用命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 程序包。如图3
第 3 步:安装 Shopify CLI 3.x。Shopify CLI 作为一组 Node.js 包进行管理,包含: @shopify/cli 、 @shopify/theme 。可在 Windows 上全局安装这些包。不再支持 apt、Yum 和 RubyGems 安装。要为主题安装 Shopify CLI,请使用命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 程序包

图3



PS C:\Users\Lenovo> npm install -g @shopify/cli @shopify/theme
npm WARN deprecated @oclif/screen@3.0.4: Deprecated in favor of @oclif/core
npm WARN deprecated @oclif/screen@3.0.4: Deprecated in favor of @oclif/core

changed 824 packages in 1m

93 packages are looking for funding
  run `npm fund` for details


9、第 4 步:验证安装。要验证 Shopify CLI 是否已正确安装,请运行以下命令,该命令返回一个版本号。当前版本:3.40.1。确认已经升级至:Shopify CLI 3.x。如图4
第 4 步:验证安装。要验证 Shopify CLI 是否已正确安装,请运行以下命令,该命令返回一个版本号。当前版本:3.40.1。确认已经升级至:Shopify CLI 3.x

图4



PS C:\Users\Lenovo> shopify version
Current Shopify CLI version: 3.40.1


   ]]>
https://www.shuijingwanwq.com/2023/02/11/7408/feed/ 0
在 Windows 10 专业版中安装 Shopify CLI 3.0(基于 Node.js),提前检查相应的要求是否满足 https://www.shuijingwanwq.com/2023/02/09/7402/ https://www.shuijingwanwq.com/2023/02/09/7402/#comments Thu, 09 Feb 2023 01:21:54 +0000 https://www.shuijingwanwq.com/?p=7402 浏览量: 168 1、参考:https://shopify.dev/themes/tools/cli/install#requirements ,在 Windows 中的要求如下


Node.js 14.17.0 or higher
Ruby+Devkit 3.0, installed using RubyInstaller for Windows
(select the MSYS2 component and the MSYS2 base installation option)
Git
Bundler 2.3.8 or higher


2、Node.js 的版本是:v16.13.1,高于 14.17.0。符合要求。


PS E:\wwwroot\laravel-6> node -v
v16.13.1


3、参考:https://www.shuijingwanwq.com/2022/05/10/6388/ 。第1、2步骤。Ruby+Devkit 的版本是:3.1.X (x64),高于 Ruby+Devkit 3.0。符合要求。 4、Bundler 的版本是:2.3.24,高于 2.3.8。符合要求。


PS E:\wwwroot\laravel-6> bundle -v
Bundler version 2.3.24


5、要为主题安装 Shopify CLI,请使用命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 程序包。如图1
要为主题安装 Shopify CLI,请使用命令行全局安装 @shopify/cli 和 @shopify/theme Node.js 程序包

图1



PS E:\wwwroot> npm install -g @shopify/cli @shopify/theme

added 824 packages, and audited 825 packages in 2m

93 packages are looking for funding
  run `npm fund` for details

3 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 8.1.2 -> 9.4.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.4.1
npm notice Run npm install -g npm@9.4.1 to update!
npm notice


6、npm 的新主要版本可用! 8.1.2 -> 9.4.1。运行 npm install -g npm@9.4.1 进行更新!


PS E:\wwwroot> npm install -g npm@9.4.1

added 1 package, and audited 27 packages in 9s

found 0 vulnerabilities


7、要验证 Shopify CLI 是否已正确安装,运行以下命令。发现版本为 2.x,有待迁移至 3.x。如图2
要验证 Shopify CLI 是否已正确安装,运行以下命令。发现版本为 2.x,有待迁移至 3.x

图2



PS E:\wwwroot> shopify version
* A new version of Shopify CLI is available! You have version 2.15.6 and the latest version is 2.34.0.

  To upgrade, follow the instructions for the package manager you’re using:
  https://shopify.dev/tools/cli/troubleshooting#upgrade-shopify-cli

2.15.6


]]>
https://www.shuijingwanwq.com/2023/02/09/7402/feed/ 2