Linux安装Google Chrome浏览器

8次阅读
没有评论

在CentOS 上安装86083_de6u_3854.webpGoogle Chrome浏览器可以通过以下步骤进行:

一、安装必要的依赖包。使用root权限执行以下命令以安装必要的依赖包,这些依赖包包括Red Hat Linux的特定版本、libXss、libappindicator

yum -y install redhat-lsb*
yum -y install libXss*
yum -y install libappindicator*

二、从Google官方网站下载Google Chrome的安装包,选择Linux系统,并下载`google-chrome-stable_current_x86_64.rpm

谷歌浏览器各个版本下载源

rpm包(centos、opensuse)

wget http://dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64/google-chrome-stable-124.0.6367.118-1.x86_64.rpm

deb包(ubuntu、debian)

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

三、使用root权限进行安装。

1:rpm包 本地安装

rpm -ivh google-chrome-stable-124.0.6367.118-1.x86_64.rpm

2:yum安装

yum -y install http://dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64/google-chrome-stable-124.0.6367.118-1.x86_64.rpm

3:yum本地安装(自动解决依赖问题)

yum localinstall google-chrome-stable-124.0.6367.118-1.x86_64.rpm

四、如果在安装过程中遇到依赖问题,可以尝试使用yum localinstall命令安装,这将自动解决依赖问题。123 请注意,在安装过程中可能会遇到依赖问题,如需要安装`liberation-fonts`和`libvulkan.so.1`等。在这种情况下,可以手动安装所需的依赖包,然后再尝试重新安装Google Chrome。

五、无法运行解决办法。

修改/opt/google/chrome/google-chrome文件

cd /opt/google/chrome/
vim google-chrome

vim /opt/google/chrome/google-chrome

将最后一行的

exec -a "$0" "$HERE/chrome" "$@"

替换为

exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox

sed一键替换

sed -e 's|^exec -a "$0" "$HERE/chrome" "$@"|exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox|g' \
    -i.bak \
    /opt/google/chrome/google-chrome
sed -i 's|^exec -a "$0" "$HERE/chrome" "$@"|exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox|g' /opt/google/chrome/google-chrome

copy至桌面

cp /usr/share/applications/google-chrome.desktop /root/桌面/google-chrome.desktop
正文完
 0
评论(没有评论)