Fork me on GitHub

CentOS7环境下安装Chrome

方式一

下载Chrome浏览器的rpm包(https://www.chrome64bit.com/index.php/google-chrome-64-bit-for-linux)
利用xshell连接好Linux,使用命令rz,弹出选择窗口,将下载好的包上传进去,然后进入包目录,使用rpm命令进行安装

1
rpm -ivh google-chrome-stable_current_x86_64.rpm

当然,这里需要切换到root用户下才可以执行。
执行完命令后会出现错误
1

出现这个错误是因为少了redhat-lsb这个依赖

安装readhat-lsb依赖:

1
yum -y install  redhat-lsb

安装完上面的lsb依赖后,再来执行chrome安装包:

1
rpm -ivh google-chrome-stable_current_x86_64.rpm

至此Chrome就安装完毕了,打开 应用程序 》互联网 就会发现Chrome的图标了

方式二

在以上正常的安装方式中, 我安装失败了,原因是我的key无法更新,于是我就选择了另外一种在线安装。以下记录了在线安装的过程。仅供参考,大佬勿喷。

修改yum源

在/etc/yum.repos.d/目录下新建文件google-chrome.repo,向其中添加如下内容:

1
2
3
4
5
6
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

安装

1
yum install google-chrome-stable

注:Google官方源在国内可能无法正常访问,导致安装失败或安装后无法正常更新,可以尝试添加–nogpgcheck参数再安装。

1
yum install google-chrome-stable --nogpgcheck

或者可以尝试修改gpgcheck=0再安装。

本文标题:CentOS7环境下安装Chrome

文章作者:LiuXiaoKun

发布时间:2019年01月02日 - 23:01

最后更新:2019年01月02日 - 23:01

原始链接:https://LiuZiQiao.github.io/2019/01/02/CentOS7环境下安装Chrome/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

0%