启动Chrome提示GLIBCXX_3.4.29缺失的问题求助
解决Chrome启动时的snap库依赖错误
检查并切换Chrome安装版本
- 先确认当前Chrome的安装来源:
which google-chrome-stable - 如果输出是
/snap/bin/google-chrome-stable,说明你用的是snap版Chrome,这就是问题根源。卸载snap版:sudo snap remove google-chrome - 安装deb版Chrome:
- 添加Chrome官方源:
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list - 安装deb版:
sudo apt update && sudo apt install google-chrome-stable
- 添加Chrome官方源:
更新系统libstdc++库
如果确认是deb版Chrome仍出现错误,更新系统的libstdc++6库,确保/usr/lib下的库版本满足要求:
sudo apt update && sudo apt install --reinstall libstdc++6
屏蔽snap环境干扰(无需卸载snap)
如果不想卸载snap,可以创建一个自定义启动脚本,清除snap相关环境变量并强制加载系统库:
- 创建脚本文件
chrome-launcher.sh:#!/bin/bash # 清除snap相关环境变量 unset SNAP unset SNAP_NAME unset SNAP_REVISION # 强制加载系统的libstdc++库 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 google-chrome-stable --profile-directory=Default - 给脚本添加执行权限:
chmod +x chrome-launcher.sh - 以后用这个脚本启动Chrome即可。
内容的提问来源于stack exchange,提问作者John Kall
相关产品推荐
相关产品推荐

