CentOS安装Chrome浏览器
1、下载Chrome
直接到谷歌官网下载.rpm文件 https://www.google.cn/chrome/
2、安装Chrome
执行下列命令即可:
[root@localhost Downloads]# rpm -ivh google-chrome-stable_current_x86_64.rpm
3、可能出现的问题
3.1 执行命令后报错
错误:依赖检测失败:
/usr/bin/lsb_release 被 google-chrome-stable-71.0.3578.98-1.x86_64 需要
libappindicator3.so.1()(64bit) 被 google-chrome-stable-71.0.3578.98-1.x86_64 需要
liberation-fonts 被 google-chrome-stable-71.0.3578.98-1.x86_64 需要
解决方法:
1、针对出现的3个问题的第一个问题:/usr/bin/lsb_release,执行:
[root@localhost Downloads]# repoquery --nvr --whatprovides /usr/bin/lsb_release
会输出以下内容(输出的内容即为所需要安装的插件依赖):
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
redhat-lsb-core-4.1-27.el7.centos.1
redhat-lsb-core-4.1-27.el7.centos.1
此时再执行:
[root@localhost Downloads]# yum install -y redhat-lsb-core-4.1-27.el7.centos.1
这样,第一个问题就解决了
2、第二个问题:libappindicator3.so.1,步骤是一样的(两步:一是查看所需要的依赖文件,二是安装依赖文件)。
[root@localhost Downloads]# repoquery --nvr --whatprovides libappindicator3.so.1
输出内容为:
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
libappindicator-gtk3-12.10.0-13.el7
执行:
[root@localhost Downloads]# yum install -y libappindicator-gtk3-12.10.0-13.el7
3、第三个问题:liberation-fonts
[root@localhost Downloads]# repoquery --nvr --whatprovides liberation-fonts
输出内容为:
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
liberation-fonts-1.07.2-16.el7
执行:
[root@localhost Downloads]# yum install -y liberation-fonts-1.07.2-16.el7
4、最后,再安装rpm文件就可以啦。
[root@localhost Downloads]# rpm -ivh google-chrome-stable_current_x86_64.rpm
3.2 点击Chrome图标无法启动问题
1、命令行启动:/usr/bin/google-chrome-stable --no-sandbox
2、若不想命令行启动,则文件下中进入/usr/share/applications/,找到chrome图表,右键,属性,启动方式后面加上–no-sandbox,或者vi /usr/share/applications/google-chrome.desktop,启动加–no-sandbox,双击此图标即可启动chrome