其实 OpenClaw 的浏览器组件在无桌面环境(Headless)下需要特定的‘打开方式’
Debian/Ubuntu (.deb):
shell# 下载浏览器
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# 安装浏览器
sudo dpkg -i google-chrome-stable_current_amd64.deb
# 更新软件源
sudo apt update
# 安装Noto字体核心包
sudo apt install fonts-noto fonts-noto-cjk fonts-noto-color-emoji
# 刷新字体缓存
fc-cache -fv
或Centos(.rpm)安装包:
shellwget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
# 安装依赖包
yum install -y liberation-fonts
yum install -y xdg-utils
#安装字体,防止浏览器文字加载不出来
yum install -y google-noto-sans-cjk-fonts
# 安装google包 ,注意:这里用 yum localinstall,它会自动补齐依赖
yum localinstall -y ./google-chrome-stable_current_x86_64.rpm
shell# 设置默认使用 openclaw 模式
openclaw config set browser.defaultProfile "openclaw"
# 再次确认无桌面模式开启
openclaw config set browser.headless true
# 2. 强制开启 NoSandbox (否则以root用户运行的openclaw,Chrome 出于安全策略拒绝启动)
openclaw config set browser.noSandbox true
# 确认chrome路径
openclaw config set browser.executablePath "/usr/bin/google-chrome"
shellopenclaw gateway restart
shellopenclaw browser start
shellopenclaw browser status