Install Google Chrome on Rocky Linux 9/8

ComputingPost
5 min readDec 28, 2022

--

Rocky Linux users know that Firefox is, by default, installed on most Linux. This is no exception when it comes to Rocky Linux. However, as good as Firefox, desktop users may often prefer installing another web browser, in this case, Google Chrome which is still the most prominent used browser worldwide. With so many Google Chrome updates that are pushed as a result of being so popular, having the browser directly installed from the source instead of waiting for a maintainer from a third party to push it is better. Also, as a bonus, people who like testing edge software can install the beta or unstable repository builds using the same technique, with a bit of modification to the commands.

In the following tutorial, you will learn how to install Google Chrome on Rocky Linux 9 or Rocky Linux 8 using the command line terminal and Google’s DNF repository for the latest version binary at all times. This ensures if an urgent update is required, you do need to wait for it to become live on a third-party repository.

Recommended Steps Before Installation

Before you begin, ensure your system is up-to-date to avoid any conflicts during the installation, and for good practice, use the terminal command as follows.

sudo dnf upgrade --refresh

Install Google Chrome Browser on Rocky Linux

Users have three choices to import for their Google Chrome Browser installation. The first and most recommended is to install the stable browser branch for most of your usage. However, since they are not unique, you can install the beta and unstable builds and stable for more advanced or curious users.

Firstly, import the GPG key with the following command before installing the browser.

Import GPG Key

sudo rpm --import https://dl.google.com/linux/linux_signing_key.pub

Rocky Linux 9 — troubleshooting GPG import.

Rocky Linux 9 users will notice the following error when importing the GPG key.

[haifa@rocky-linux ~]$ sudo rpm --import https://dl.google.com/linux/linux_signing_key.pub

warning: Signature not supported. Hash algorithm SHA1 not available.

error: https://dl.google.com/linux/linux_signing_key.pub: key 2 import failed.

Please note Rocky Linux 8 users do not need to do the above unless the error appears, and this is only present in EL9 onwards.

The easiest method to fix this is to change the crypto policies and set the policy to LEGACY.

sudo update-crypto-policies --set LEGACY

It is highly recommended you reboot your system. You usually do not need to, but if you encounter issues, do a restart.

reboot

Install Google Chrome Stable

With the GPG key imported and only the crypto policies updated for Rocky Linux 9 users, you can begin installing the Google Chrome browser.

sudo dnf install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm -y

Additionally, you can install Google Chrome Beta, or unstable browser builds if you’ve added the repositories. These two versions aren’t recommended for everyday use, especially not on a main desktop or production environment, but for those that love to live on the edge and try new things, here’s what you need to do.

Note that they do not replace your stable version and are installed separately.

Install Google Chrome beta browser

sudo dnf install https://dl.google.com/linux/direct/google-chrome-beta_current_x86_64.rpm -y

Install Google Chrome unstable browser

sudo dnf install https://dl.google.com/linux/direct/google-chrome-unstable_current_x86_64.rpm -y

Launch Google Chrome Browser on Rocky Linux

Once the installation is complete, you can launch the Google Chrome web browser using either CLI or the application icon.

First, while in your terminal, use the following command.

google-chrome

Remember to add on -beta or -unstable to google-chrome command if you used one of these alternative browser builds.

The best way to use the browser for desktop users that prefer not to use the command line terminal is to open the GUI of the application by following the path.

Activities > Show Applications > Google Chrome version.

Example:

The first time you open Chrome, you will be greeted with the following pop-up window. This message has the usual prompt about sending Google information about crashes and making Google the default browser.

Example:

Uncheck or leave as is and click the OK button to continue.

See also How to Enable BBR on Ubuntu 22.04 LTS

Next, you will land at the default search engine landing page, a standard Google look.

Example (Click Image to Enlarge):

Example about Chrome settings page:

Additional Commands & Tips

Update Google Chrome Browser on Rocky Linux

Google Chrome browser users will be notified of updates, given that you have installed it with the DNF package manager and the rest of your system updates. However, it is advised to run a command-line terminal update check to ensure updates if you use the GUI update method are being fetched and installed correctly.

sudo dnf upgrade --refresh

Remove Google Chrome Browser on Rocky Linux

Run one of the following commands corresponding to your Chrome version for users who wish not to have the browser installed anymore.

Remove Google Chrome Stable

sudo dnf autoremove google-chrome-stable -y

Note that unused dependencies will also be removed.

If you have installed the beta or unstable version.

Remove Google Chrome Beta

sudo dnf autoremove google-chrome-beta -y

Remove Google Chrome Unstable

sudo dnf autoremove google-chrome-unstable -y

Disable/Enable Google Chrome Repository

Finally, it is always a good idea to disable the repositories if you no longer require them; you can re-enable them later if you want to install the browser again.

sudo dnf config-manager --set-disabled google-chrome*

Note this will blanket disable all Google Chrome browser repositories. Replace google-chrome* with the full name by printing the repositories you have imported into your terminal.

dnf repolist | grep chrome

Then disable, for example, the beta repository only while keeping the stable or unstable, etc.

sudo dnf config-manager --set-disabled google-chrome-beta

Use the following enable command for users who want to re-enable the repositories for future installs.

sudo dnf config-manager --set-enabled google-chrome*

Replace google-chrome* again with the exact version if you disable individual Chrome repositories.

Conclusion

In the tutorial, you have learned how to import the Google GPG key and for Rocky Linux 9 users learned how to fix the crypto-policies to successfully import the key along with installing the browser with CLI commands with three alternatives Google Chrome build versions to select from.

https://www.computingpost.com/install-google-chrome-on-rocky-linux-9-8/?feed_id=23925&_unique_id=63ac2005a6692

--

--

ComputingPost
ComputingPost

Written by ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.

No responses yet