How to install Chrome browser on Rocky Linux or AlmaLinux

Download GPG key:

sudo dnf install wget -y

輸出的訊息:

$ sudo dnf install wget -y
[sudo] password for max: 
Sorry, try again.
[sudo] password for max: 
Rocky Linux 8 - AppStream                       5.3 kB/s | 4.8 kB     00:00    
Rocky Linux 8 - BaseOS                          7.7 kB/s | 4.3 kB     00:00    
Rocky Linux 8 - Extras                          4.8 kB/s | 3.1 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64  8.0 kB/s | 8.7 kB     00:01    
Extra Packages for Enterprise Linux 8 - x86_64  1.7 MB/s |  14 MB     00:08    
Package wget-1.19.5-10.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

wget https://dl.google.com/linux/linux_signing_key.pub

輸出訊息:

$ wget https://dl.google.com/linux/linux_signing_key.pub
--2023-02-27 13:58:36--  https://dl.google.com/linux/linux_signing_key.pub
Resolving dl.google.com (dl.google.com)... 172.217.163.46, 2404:6800:4012:4::200e
Connecting to dl.google.com (dl.google.com)|172.217.163.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14613 (14K) [application/octet-stream]
Saving to: 'linux_signing_key.pub'

linux_signing_key.p 100%[===================>]  14.27K  --.-KB/s    in 0s      

2023-02-27 13:58:37 (66.5 MB/s) - 'linux_signing_key.pub' saved [14613/14613]

sudo rpm --import linux_signing_key.pub
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

輸出訊息:

--2023-02-27 14:01:34--  https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Resolving dl.google.com (dl.google.com)... 172.217.163.46, 2404:6800:4012:4::200e
Connecting to dl.google.com (dl.google.com)|172.217.163.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 100101712 (95M) [application/x-rpm]
Saving to: 'google-chrome-stable_current_x86_64.rpm'

google-chrome-stabl 100%[===================>]  95.46M   120MB/s    in 0.8s    

2023-02-27 14:01:35 (120 MB/s) - 'google-chrome-stable_current_x86_64.rpm' saved [100101712/100101712]

sudo dnf install google-chrome-stable_current_x86_64.rpm

輸出訊息:

Last metadata expiration check: 0:09:44 ago on Mon 27 Feb 2023 01:52:57 PM CST.
Dependencies resolved.
================================================================================
 Package                   Arch      Version              Repository       Size
================================================================================
Installing:
 google-chrome-stable      x86_64    110.0.5481.177-1     @commandline     95 M
Installing dependencies:
 liberation-fonts          noarch    1:2.00.3-7.el8       baseos           19 k
 liberation-sans-fonts     noarch    1:2.00.3-7.el8       baseos          609 k
 liberation-serif-fonts    noarch    1:2.00.3-7.el8       baseos          608 k
 mesa-vulkan-drivers       x86_64    22.1.5-2.el8         appstream       5.9 M
 vulkan-loader             x86_64    1.3.224.0-2.el8      appstream       138 k

Transaction Summary
================================================================================
Install  6 Packages

Total size: 103 M
Total download size: 7.3 M
Installed size: 329 M
Is this ok [y/N]:

這時候,要輸入 Y

然後就安裝好了~

Installed:
  google-chrome-stable-110.0.5481.177-1.x86_64                                  
  liberation-fonts-1:2.00.3-7.el8.noarch                                        
  liberation-sans-fonts-1:2.00.3-7.el8.noarch                                   
  liberation-serif-fonts-1:2.00.3-7.el8.noarch                                  
  mesa-vulkan-drivers-22.1.5-2.el8.x86_64                                       
  vulkan-loader-1.3.224.0-2.el8.x86_64                                          

Complete!

檢查 repo 有無進系統環境中

sudo dnf repolist

執行結果:

可以看到 google-chrome 就是正確了。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *