CentOS7 安装Chrome

使用命令下载rpm安装包:

1

wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

下载包名为google-chrome-stable_current_x86_64.rpm 使用root权限进行安装

1

rpm -ivh google-chrome-stable_current_x86_64.rpm

安装中报错:

1

2

3

4

/usr/bin/lsb_release 被 google-chrome-stable-74.0.3729.169-1.x86_64 需要

libXss.so.1()(64bit) 被 google-chrome-stable-74.0.3729.169-1.x86_64 需要

libappindicator3.so.1()(64bit) 被 google-chrome-stable-74.0.3729.169-1.x86_64 需要

liberation-fonts 被 google-chrome-stable-74.0.3729.169-1.x86_64 需要

安装依赖包:

1

2

3

sudo yum install liberation-fonts

sudo yum -y install libXss*

sudo yum install libappindicator*

还有一个错误:

1

/usr/bin/lsb_release 被 google-chrome-stable-74.0.3729.169-1.x86_64 需要

先查找哪个源包含这个命令

1

yum provides */lsb_release

image

从上面的输出可以看到redhat-lsb-core-4.1-27.el7.centos.1.x86_64这个package包含这个命令,安装这个包。

1

sudo yum install redhat-lsb-core-4.1-27.el7.centos.1.x86_64

 错误:

警告:google-chrome-stable_current_x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 7fac5991: NOKEY
错误:依赖检测失败:
	libvulkan.so.1()(64bit) 被 google-chrome-stable-83.0.4103.61-1.x86_64 需要

fix it;

yum localinstall google-chrome-stable_current_x86_64.rpm

 

然后使用命令安装:

1

sudo rpm -ivh google-chrome-stable_current_x86_64.rpm

image

可以看到Chrome已经成功安装:

image

 

方式二:

Centos7安装谷歌浏览器

1. 下载安装包

用浏览器下载包:https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

 

2. 安装

[root@wilber ~]# cd /root/下载/          //进入包下载的目录

[root@wilber ~]# rpm  -ivh  google-chrome-stable_current_x86_64.rpm

注:若报错缺少依赖包,则yum install -y 安装好对应的依赖包再安装google-chrome


3. 添加google-chrome快捷方式到桌面
将 /usr/share/application/ 目录下的 Google Chrome 图标复制到桌面,如图:

( 或在终端用命令复制 # cp  /usr/share/applications/google-chrome.desktop  /root/桌面/  )

 复制到桌面后是一个文件 "google-chrome.desktop",如图:

直接双击运行,弹出的对话框选 “Trust and Launch” 即可启动,文件变为Google Chrome的图标:

 

 

解决打不开的问题:

解决google-chrome无法启动的问题

问题表现:

双击Google Chrome图标无反应,无法打开浏览器。 

在命令行打开报错:

[root@wilber ~]# /usr/bin/google-chrome
[5024:5024:0113/164154.164753:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

 

解决方法:

[root@wilber ~]# /usr/bin/google-chrome --no-sandbox        //添加--no-sandbox后即可启动浏览器

 

桌面图标右击-->属性-->启动命令后添加“--no-sandbox”

即:/usr/bin/google-chrome-stable %U --no-sandbox

 

[root@wilber ~]# vim  /usr/share/applications/google-chrome.desktop

修改:Exec=/usr/bin/google-chrome-stable %U

为:Exec=/usr/bin/google-chrome-stable %U --no-sandbox

 

OK!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值