下載chrome安裝包
鏈接: https://pan.baidu.com/s/1w5B2_X59reMFzh2Eo7dgsw?pwd=1111 提取碼: 1111
或
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
安裝
嘗試安裝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 的軟件包已經(jīng)安裝。正在檢查更新蚪缀。
無須任何處理
[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吃靠、將服務(wù)器上的軟件包信息緩存到本地,以提高搜索安裝軟件的速度
yum makecache
如果你在執(zhí)行上面這邊命令時,報錯:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
建議用如下方法解決:檢查/etc/yum.repos.d/下是否有epel.repo文件足淆,如果有巢块,重命名為epel.repo_bak 千萬不能以.repo格式備份礁阁,然后在執(zhí)行一次上面的命令即可!
CentOS7對應(yīng)地址: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!
安裝成功族奢!
驗證一下
總結(jié):
1姥闭、下載安裝包
2、更新源注意備份 wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3越走、安裝 yum localinstall google-chrome-stable_current_x86_64.rpm