From 29f5908098956a04abf69fde6969327828ba2c1c Mon Sep 17 00:00:00 2001 From: "openclaw-docs-i18n[bot]" Date: Wed, 22 Apr 2026 04:04:39 +0000 Subject: [PATCH] chore(i18n): refresh zh-CN translations --- docs/zh-CN/install/updating.md | 57 +++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/docs/zh-CN/install/updating.md b/docs/zh-CN/install/updating.md index 664a2e4ea..3a5aac3cc 100644 --- a/docs/zh-CN/install/updating.md +++ b/docs/zh-CN/install/updating.md @@ -1,14 +1,14 @@ --- read_when: - - 更新 OpenClaw 时 + - 更新 OpenClaw - 更新后出现问题 summary: 安全更新 OpenClaw(全局安装或源码安装),以及回滚策略 title: 更新 x-i18n: - generated_at: "2026-04-06T00:47:09Z" + generated_at: "2026-04-22T04:04:23Z" model: gpt-5.4 provider: openai - source_hash: ca9fff0776b9f5977988b649e58a5d169e5fa3539261cb02779d724d4ca92877 + source_hash: 6ab2b515457c64d24c830e2e1678d9fefdcf893e0489f0d99b039db3b877b3c4 source_path: install/updating.md workflow: 15 --- @@ -30,14 +30,14 @@ openclaw update ```bash openclaw update --channel beta openclaw update --tag main -openclaw update --dry-run # 预览但不实际应用 +openclaw update --dry-run # 仅预览,不实际应用 ``` -`--channel beta` 会优先选择 beta,但当 beta 标签不存在或版本比最新稳定版更旧时,运行时会回退到 stable/latest。如果你想为一次性的软件包更新使用原始 npm beta dist-tag,请使用 `--tag beta`。 +`--channel beta` 会优先选择 beta,但当 beta 标签不存在或版本落后于最新稳定版时,运行时会回退到 stable/latest。如果你想在一次性包更新中使用原始 npm beta dist-tag,请使用 `--tag beta`。 -有关渠道语义,请参阅[开发渠道](/zh-CN/install/development-channels)。 +有关渠道语义,请参见[开发渠道](/zh-CN/install/development-channels)。 -## 另一种方式:重新运行安装程序 +## 备选方案:重新运行安装脚本 ```bash curl -fsSL https://openclaw.ai/install.sh | bash @@ -45,7 +45,7 @@ curl -fsSL https://openclaw.ai/install.sh | bash 添加 `--no-onboard` 可跳过新手引导。对于源码安装,请传入 `--install-method git --no-onboard`。 -## 另一种方式:手动使用 npm、pnpm 或 bun +## 备选方案:手动使用 npm、pnpm 或 bun ```bash npm i -g openclaw@latest @@ -59,9 +59,22 @@ pnpm add -g openclaw@latest bun add -g openclaw@latest ``` +### 由 root 拥有的全局 npm 安装 + +某些 Linux 的 npm 配置会将全局包安装到由 root 拥有的目录中,例如 `/usr/lib/node_modules/openclaw`。OpenClaw 支持这种布局:安装后的包在运行时会被视为只读,内置插件的运行时依赖会被暂存到一个可写的运行时目录中,而不是直接修改包目录树。 + +对于强化过的 systemd 单元,请设置一个可写的暂存目录,并将其包含在 `ReadWritePaths` 中: + +```ini +Environment=OPENCLAW_PLUGIN_STAGE_DIR=/var/lib/openclaw/plugin-runtime-deps +ReadWritePaths=/var/lib/openclaw /home/openclaw/.openclaw /tmp +``` + +如果未设置 `OPENCLAW_PLUGIN_STAGE_DIR`,OpenClaw 会在 systemd 提供时使用 `$STATE_DIRECTORY`,否则回退到 `~/.openclaw/plugin-runtime-deps`。 + ## 自动更新器 -自动更新器默认关闭。可在 `~/.openclaw/openclaw.json` 中启用: +自动更新器默认关闭。在 `~/.openclaw/openclaw.json` 中启用它: ```json5 { @@ -77,13 +90,13 @@ bun add -g openclaw@latest } ``` -| 渠道 | 行为 | -| -------- | ------------------------------------------------------------------------------------------------------------- | -| `stable` | 等待 `stableDelayHours` 后,在 `stableJitterHours` 范围内以确定性抖动方式应用(分散发布)。 | +| Channel | 行为 | +| -------- | ---- | +| `stable` | 等待 `stableDelayHours` 后应用,并在 `stableJitterHours` 范围内使用确定性抖动分散发布。 | | `beta` | 每隔 `betaCheckIntervalHours` 检查一次(默认:每小时),并立即应用。 | | `dev` | 不会自动应用。请手动使用 `openclaw update`。 | -Gateway 网关也会在启动时记录更新提示(可通过 `update.checkOnStart: false` 禁用)。 +Gateway 网关还会在启动时记录更新提示(可通过 `update.checkOnStart: false` 禁用)。 ## 更新后 @@ -95,7 +108,7 @@ Gateway 网关也会在启动时记录更新提示(可通过 `update.checkOnSt openclaw doctor ``` -迁移配置、审计私信策略,并检查 Gateway 网关健康状态。详情请参阅:[Doctor](/zh-CN/gateway/doctor) +迁移配置、审计私信策略,并检查 Gateway 网关健康状态。详情: [Doctor](/zh-CN/gateway/doctor) ### 重启 Gateway 网关 @@ -113,7 +126,7 @@ openclaw health ## 回滚 -### 固定版本(npm) +### 固定到某个版本(npm) ```bash npm i -g openclaw@ @@ -123,7 +136,7 @@ openclaw gateway restart 提示:`npm view openclaw version` 会显示当前已发布的版本。 -### 固定提交(源码) +### 固定到某个提交(源码) ```bash git fetch origin @@ -132,17 +145,17 @@ pnpm install && pnpm build openclaw gateway restart ``` -返回最新版本:`git checkout main && git pull`。 +要恢复到最新版本:`git checkout main && git pull`。 ## 如果你卡住了 - 再次运行 `openclaw doctor`,并仔细阅读输出内容。 -- 对于源码检出的 `openclaw update --channel dev`,更新器会在需要时自动引导安装 `pnpm`。如果你看到 pnpm/corepack 引导错误,请手动安装 `pnpm`(或重新启用 `corepack`),然后重新运行更新。 +- 对于源码检出中的 `openclaw update --channel dev`,更新器会在需要时自动引导安装 `pnpm`。如果你看到 pnpm/corepack 引导错误,请手动安装 `pnpm`(或重新启用 `corepack`),然后重新运行更新。 - 查看:[故障排除](/zh-CN/gateway/troubleshooting) -- 在 Discord 中提问:[https://discord.gg/clawd](https://discord.gg/clawd) +- 在 Discord 提问:[https://discord.gg/clawd](https://discord.gg/clawd) ## 相关内容 -- [安装概览](/zh-CN/install) — 所有安装方式 -- [Doctor](/zh-CN/gateway/doctor) — 更新后的健康检查 -- [迁移](/zh-CN/install/migrating) — 主版本迁移指南 +- [安装概览](/zh-CN/install) —— 所有安装方式 +- [Doctor](/zh-CN/gateway/doctor) —— 更新后的健康检查 +- [迁移](/zh-CN/install/migrating) —— 主要版本迁移指南