Ubuntu 安装 Google Chrome 及常见问题解决指南(2026)

📝 189 字 · ☕ 1 分钟阅读

为什么 Ubuntu 安装 Chrome 会遇到问题?

Ubuntu 默认使用 Snap 包管理器和 Firefox 浏览器。Google Chrome 没有官方 Snap 包,只能通过 APT 仓库或 .deb 包安装。常见问题包括:缺少依赖库、沙箱安全限制、GPU 兼容性问题等。本文逐一解决。

方法一:通过 Google 官方 APT 仓库安装(推荐)

# 1. 下载并导入 Google 签名密钥
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg

# 2. 添加 Google Chrome 仓库
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'

# 3. 更新并安装
sudo apt update
sudo apt install google-chrome-stable -y

方法二:手动下载 .deb 安装

# 下载最新版 .deb 包
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

# 安装(自动处理依赖)
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install -y  # 补全缺失依赖

常见问题排查

1. Chrome 无法启动(Segmentation fault / 无反应)

最常见的原因是沙箱(sandbox)问题,尤其在 Docker 容器或 VPS 中:

# 临时方案:禁用沙箱启动
google-chrome-stable --no-sandbox

# 永久方案:在启动命令中加入 --no-sandbox
# 编辑 /usr/share/applications/google-chrome.desktop
sudo sed -i 's/Exec=\/usr\/bin\/google-chrome-stable/Exec=\/usr\/bin\/google-chrome-stable --no-sandbox/' /usr/share/applications/google-chrome.desktop

2. 缺少依赖库错误

如果启动时提示缺少 libnss3.solibx11-xcb.so.1 等:

sudo apt install libnss3 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 -y

3. GPU 渲染问题

VPS 或虚拟机中通常没有 GPU:

# 关闭 GPU 加速
google-chrome-stable --disable-gpu

# 永久禁用:创建别名
echo 'alias chrome="google-chrome-stable --disable-gpu --no-sandbox"' >> ~/.bashrc
source ~/.bashrc

设置 Chrome 为默认浏览器

# 命令行设置
sudo update-alternatives --set x-www-browser /usr/bin/google-chrome-stable
sudo update-alternatives --set gnome-www-browser /usr/bin/google-chrome-stable

总结

Ubuntu 安装 Chrome 的三大步骤:添加仓库 → 安装 → 处理沙箱问题。

📤 分享这篇文章