> ## Documentation Index
> Fetch the complete documentation index at: https://autclaw.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# 为 autClaw 配置 Chromium 中文环境

> 在 Debian 或 Ubuntu 直接运行 autClaw release 产物时安装 Chromium、中文字体和 locale，修复截图与浏览器脚本中文显示。

如果你不用 Docker，而是直接运行 release / 编译产物，浏览器、网页截图和 `chromedp` 相关脚本能否正常显示中文，取决于宿主机是否安装 Chromium 中文语言包、CJK 字体和 `zh_CN.UTF-8` locale。

Docker 镜像已经内置常用运行环境。只有在宿主机直接运行 autClaw，且截图、浏览器脚本或页面渲染出现中文方块、乱码或缺字时，才需要按本页安装。

## Debian / Ubuntu 一键安装

```bash theme={null}
sudo bash -lc 'set -euo pipefail; export DEBIAN_FRONTEND=noninteractive; apt-get update; apt-get install -y --no-install-recommends chromium chromium-l10n locales fonts-noto-cjk fonts-noto-color-emoji fonts-wqy-zenhei; sed -i "s/^# *zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/" /etc/locale.gen; grep -q "^zh_CN.UTF-8 UTF-8$" /etc/locale.gen || echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen; locale-gen zh_CN.UTF-8; install -d /usr/local/bin; printf "%s\n" "#!/usr/bin/env bash" "set -euo pipefail" "export LANG=zh_CN.UTF-8" "export LC_ALL=zh_CN.UTF-8" "export LANGUAGE=zh_CN:zh" "exec /usr/bin/chromium --lang=zh-CN \"\$@\"" > /usr/local/bin/chromium; cp /usr/local/bin/chromium /usr/local/bin/chromium-browser; chmod 755 /usr/local/bin/chromium /usr/local/bin/chromium-browser; fc-cache -f'
```

安装后，重新启动手工启动的 Chromium / Chrome 调试进程。如果 autClaw 已运行，也建议重启一次 autClaw。

## 验证环境

```bash theme={null}
locale | grep 'zh_CN.UTF-8'
fc-match 'Noto Sans CJK SC'
chromium --version
```

如果命令没有输出中文 locale 或 CJK 字体，重新执行安装命令并确认 `locale-gen zh_CN.UTF-8` 已成功完成。
