如果是 x86 架构,直接从 Chrome 官网下载即可。如果是 arm 架构会比较麻烦,摸索了一天整理出以下方法。
1 2 3 4 5 6 7
| curl -LO https://update.cs2c.com.cn/NS/V10/V10-GFB/030/os/adv/lic/base/aarch64/packages/nss-mdns-0.14.1-3.ky10.aarch64.rpm curl -LO https://update.cs2c.com.cn/NS/V10/V10-GFB/030/os/adv/lic/base/aarch64/packages/chromium-common-90.0.4430.212-1.p01.ky10.aarch64.rpm curl -LO https://update.cs2c.com.cn/NS/V10/V10-GFB/030/os/adv/lic/base/aarch64/packages/chromium-90.0.4430.212-1.p01.ky10.aarch64.rpm yum install -y libXau.aarch64 yum localinstall -y nss-mdns-0.14.1-3.ky10.aarch64.rpm yum localinstall -y chromium-common-90.0.4430.212-1.p01.ky10.aarch64.rpm yum localinstall -y chromium-90.0.4430.212-1.p01.ky10.aarch64.rpm
|
调用的话,直接 /usr/bin/chromium-browser
。
如果需要用无头浏览器测试中文页面,还需要安装中文字体——把字体文件复制到 /usr/share/fonts/
目录下,然后执行 fc-cache -v
即可。