Linux + CentOS + Chrome 安装(附解决依赖

2021-10-19  本文已影响0人  一只小青蛙

安装

尝试安装chrome
yum install google-chrome-stable_current_x86_64.rpm

缺少依赖

依赖解析错误:

软件包:google-chrome-stable-89.0.4389.90-1.x86_64 (/google-chrome-stable_current_x86_64)
需要:liberation-fonts软件包:google-chrome-stable-89.0.4389.90-1.x86_64 (/google-chrome-stable_current_x86_64)
需要:libssl3.so(NSS_3.28)(64bit)软件包:google-chrome-stable-89.0.4389.90-1.x86_64 (/google-chrome-stable_current_x86_64)
需要:libvulkan.so.1()(64bit)

尝试暴力安装:sudo yum localinstall google-chrome-stable_current_x86_64.rpm
失败

安装依赖

第一个:
[root@localhost 桌面]# yum install liberation-fonts
已加载插件:langpacks
没有可用软件包 liberation-fonts。
错误:无须任何处理

第二个:
[root@localhost 桌面]# repoquery --nvr --whatprovides libssl3.so
nss-3.19.3-1.0.nd7.2
nss-3.19.3-1.0.nd7.2
nss-3.22.0-1.0.nd7.1
[root@localhost 桌面]# yum install nss-3.19.3-1.0.nd7.2
已加载插件:langpacks
匹配 nss-3.19.3-1.0.nd7.2.i686 的软件包已经安装。正在检查更新。
无须任何处理
[root@localhost 桌面]# yum install nss-3.22.0-1.0.nd7.1
已加载插件:langpacks
软件包 nss-3.22.0-1.0.nd7.1.i686 已安装并且是最新版本
无须任何处理

第三个:
[root@localhost 桌面]# repoquery --nvr --whatprovides libvulkan.so.1
依赖安装完成,尝试再次安装chrome:sudo yum localinstall google-chrome-stable_current_x86_64.rpm

我这里安装失败

更改阿里云的yum源

到这里,大概率是yum源的问题了,尝试更改centos7的yum源为阿里云的yum源

方法:

1、进入到/etc/yum.repos.d/目录下,备份之前的CentOS-Base.repo地址。
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
2、下载阿里云yum源
centos7:wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
centos6:wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
centot5:wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
3、将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度

yum makecache

如果你在执行上面这边命令时,报错:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

建议用如下方法解决:检查/etc/yum.repos.d/下是否有epel.repo文件,如果有,重命名为epel.repo_bak 千万不能以.repo格式备份,然后在执行一次上面的命令即可!

CentOS7对应地址:http://mirrors.aliyun.com/repo/Centos-7.repo

再次安装:sudo yum localinstall google-chrome-stable_current_x86_64.rpm
安装成功

[root@localhost 桌面]# sudo yum localinstall google-chrome-stable_current_x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining google-chrome-stable_current_x86_64.rpm: google-chrome-stable-94.0.4606.81-1.x86_64
Marking google-chrome-stable_current_x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package google-chrome-stable.x86_64 0:94.0.4606.81-1 will be installed
--> Processing Dependency: liberation-fonts for package: google-chrome-stable-94.0.4606.81-1.x86_64
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.bfsu.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
--> Processing Dependency: libvulkan.so.1()(64bit) for package: google-chrome-stable-94.0.4606.81-1.x86_64
--> Running transaction check
---> Package liberation-fonts.noarch 1:1.07.2-16.el7 will be installed
--> Processing Dependency: liberation-narrow-fonts = 1:1.07.2-16.el7 for package: 1:liberation-fonts-1.07.2-16.el7.noarch
---> Package vulkan.x86_64 0:1.1.97.0-1.el7 will be installed
--> Processing Dependency: vulkan-filesystem = 1.1.97.0-1.el7 for package: vulkan-1.1.97.0-1.el7.x86_64
--> Running transaction check
---> Package liberation-narrow-fonts.noarch 1:1.07.2-16.el7 will be installed
---> Package vulkan-filesystem.noarch 0:1.1.97.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================
 Package                  Arch    Version          Repository                             Size
===============================================================================================
Installing:
 google-chrome-stable     x86_64  94.0.4606.81-1   /google-chrome-stable_current_x86_64  270 M
Installing for dependencies:
 liberation-fonts         noarch  1:1.07.2-16.el7  base                                   13 k
 liberation-narrow-fonts  noarch  1:1.07.2-16.el7  base                                  202 k
 vulkan                   x86_64  1.1.97.0-1.el7   base                                  3.6 M
 vulkan-filesystem        noarch  1.1.97.0-1.el7   base                                  6.3 k

Transaction Summary
===============================================================================================
Install  1 Package (+4 Dependent packages)

Total size: 273 M
Total download size: 3.8 M
Installed size: 292 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/liberation-fonts-1.07.2-16.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for liberation-fonts-1.07.2-16.el7.noarch.rpm is not installed
(1/4): liberation-fonts-1.07.2-16.el7.noarch.rpm                        |  13 kB  00:00:00     
(2/4): liberation-narrow-fonts-1.07.2-16.el7.noarch.rpm                 | 202 kB  00:00:00     
(3/4): vulkan-filesystem-1.1.97.0-1.el7.noarch.rpm                      | 6.3 kB  00:00:00     
(4/4): vulkan-1.1.97.0-1.el7.x86_64.rpm                                 | 3.6 MB  00:00:02     
-----------------------------------------------------------------------------------------------
Total                                                          1.5 MB/s | 3.8 MB  00:00:02     
Retrieving key from http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 From       : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : vulkan-filesystem-1.1.97.0-1.el7.noarch                                     1/5 
  Installing : vulkan-1.1.97.0-1.el7.x86_64                                                2/5 
  Installing : 1:liberation-narrow-fonts-1.07.2-16.el7.noarch                              3/5 
  Installing : 1:liberation-fonts-1.07.2-16.el7.noarch                                     4/5 
  Installing : google-chrome-stable-94.0.4606.81-1.x86_64                                  5/5 
  Verifying  : vulkan-1.1.97.0-1.el7.x86_64                                                1/5 
  Verifying  : google-chrome-stable-94.0.4606.81-1.x86_64                                  2/5 
  Verifying  : 1:liberation-narrow-fonts-1.07.2-16.el7.noarch                              3/5 
  Verifying  : 1:liberation-fonts-1.07.2-16.el7.noarch                                     4/5 
  Verifying  : vulkan-filesystem-1.1.97.0-1.el7.noarch                                     5/5 

Installed:
  google-chrome-stable.x86_64 0:94.0.4606.81-1                                                 

Dependency Installed:
  liberation-fonts.noarch 1:1.07.2-16.el7    liberation-narrow-fonts.noarch 1:1.07.2-16.el7   
  vulkan.x86_64 0:1.1.97.0-1.el7             vulkan-filesystem.noarch 0:1.1.97.0-1.el7        

Complete!

上一篇下一篇

猜你喜欢

热点阅读