Linux安装Chrome及依赖解决

安装Chrome

下载Chrome rpm包
https://www.google.com/chrome/
安装
[root@localhost opt]# rpm -ivh google-chrome-stable_current_x86_64.rpm 
警告:google-chrome-stable_current_x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 7fac5991: NOKEY
错误:依赖检测失败:
	libatk-1.0.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libatk-bridge-2.0.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libatspi.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libcairo.so.2()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libcups.so.2()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	liberation-fonts 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libgbm.so.1()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libgtk-3.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libpango-1.0.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libvulkan.so.1()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
解决依赖关系
使用yum直接安装依赖可能出现的问题及解决方法
# 这里直接用yum安装提示没有可用的软件包
[root@localhost opt]# yum -y install libatk-1.0
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.worria.com
 * epel: my.mirrors.thegigabit.com
 * extras: mirror-hk.koddos.net
 * updates: mirror-hk.koddos.net
没有可用软件包 libatk-1.0。
错误:无须任何处理

# 将缺少的依赖复制到这个网站搜索
# 例如我要搜索libatk-1.0这个包
# 则需要完整复制libatk-1.0.so.0()(64bit)
https://pkgs.org/
这里以CentOS7为例

在这里插入图片描述

[root@localhost opt]# yum -y install atk
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.worria.com
 * epel: my.mirrors.thegigabit.com
 * extras: mirror-hk.koddos.net
 * updates: mirror-hk.koddos.net
正在解决依赖关系
--> 正在检查事务
---> 软件包 atk.x86_64.0.2.28.1-2.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

==================================================================================================================================
 Package                    架构                          版本                                  源                           大小
==================================================================================================================================
正在安装:
 atk                        x86_64                        2.28.1-2.el7                          base                        263 k

事务概要
==================================================================================================================================
安装  1 软件包

总下载量:263 k
安装大小:1.2 M
Downloading packages:
atk-2.28.1-2.el7.x86_64.rpm                                                                                | 263 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : atk-2.28.1-2.el7.x86_64                                                                                       1/1 
  验证中      : atk-2.28.1-2.el7.x86_64                                                                                       1/1 

已安装:
  atk.x86_64 0:2.28.1-2.el7                                                                                                       

完毕!
# 再次查看缺少的依赖
# 能够看到libatk-1.0.so.0()(64bit)已经解决了
# 剩下的依赖也用这个方法就能搞定
[root@localhost opt]# rpm -ivh google-chrome-stable_current_x86_64.rpm 
警告:google-chrome-stable_current_x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 7fac5991: NOKEY
错误:依赖检测失败:
	libatk-bridge-2.0.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libatspi.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libcairo.so.2()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libcups.so.2()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libgbm.so.1()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libgtk-3.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
	libpango-1.0.so.0()(64bit) 被 google-chrome-stable-100.0.4896.75-1.x86_64 需要
依赖解决完成后安装Chrome rpm包
[root@localhost opt]# rpm -ivh google-chrome-stable_current_x86_64.rpm 
警告:google-chrome-stable_current_x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 7fac5991: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:google-chrome-stable-100.0.4896.7################################# [100%]
# 查看是否安装
[root@localhost opt]# rpm -q google-chrome-stable
google-chrome-stable-100.0.4896.75-1.x86_64
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值