How to install Google Chrome 28+ on RHEL/CentOS 6 or 7

The problem

Sadly, the Google folks apparently think that the world's most popular commercial Linux (Red Hat Enterprise Linux 6 aka RHEL 6) and its free equivalents (e.g. CentOS 6 and Scientific Linux 6) are no longer worth supporting at all w.r.t. their Google Chrome browser.

Yes, they've dropped support for version 6.X of the above RHEL/CentOS-based platforms from Google Chrome 28 onwards, despite the OSes being the latest release and fully supported by their respective maintainers until November 2020! It's equally bad that the latest Mozilla Firefox and Opera browsers run happily on the platforms, providing short shrift for any excuses the Google folks have come up with to justify their somewhat blinkered support stance.

I've built Chromium from regularly pulled source code in the past for CentOS 5 and it's a tough job on that platform and I didn't want to do it again for CentOS 6. Note that RHEL/CentOS 7 users are also catered for, so please keep reading if you're on that platform.

The solution

Luckily, there is a solution to this and it's not rocket science or that original either. You need to grab libraries from a more recent Linux distro, put them in a tree (/opt/google/chrome/lib) exclusively picked up by Google Chrome and then you can indeed run Google Chrome on RHEL/CentOS 6.5 or later.

I've picked Fedora 15 and 17 RPMs to extract the libraries from because they're close to RHEL/CentOS 6's libraries and the newest ones to actually work with the latest Google Chrome release on RHEL/CentOS 6.

The download

install_chrome.sh 6.00 (27th July 2014 - handle new install trees for beta/unstable RPMs, fix for incorrect grep during beta/unstable RPM installs, new PackageKit dependency, chrome-deps RPM renamed to chrome-deps-(stable|beta|unstable))

It's a bash shell script, so you run it as root as follows:

chmod u+x install_chrome.sh
./install_chrome.sh

The script has optional command line arguments - here's the output of "./install_chrome.sh -h":

Syntax: ./install_chrome.sh [-b] [-d] [-f [-f [-f]]] [-h] [-n] [-q] [-s]
        [-t tmpdir] [-u] [-U]

-b (or --beta) will switch to beta versions (google-chrome-beta).
-d (or --delete) will delete the temporary directory used for downloads
   if an installation was successful.
-f (or --force) forces an automatic "y" for any interactive prompting
   except for OS mismatch/OS upgrade/reboot prompts. Specify -f twice to force
   it for OS mismatches or OS upgrades as well and three times for reboots
   on top of that.
-h (or -? or --help) will display this syntax message.
-n (or --dryrun) will show what actions the script will take,
   but it won't actually perform those actions.
-q (or --quiet) will switch to "quiet mode" where minimal info is displayed.
   Specify -q twice to go completely silent except for errors.
-s (or --stable) will switch to stable versions (google-chrome-stable),
   which is the default if -b or -U haven't previously been specified.
-t tmpdir (or --tmpdir tmpdir) will use tmpdir as the temporary directory
   parent tree rather than $TMPDIR (if set) or /tmp.
-u performs an uninstallation of Google Chrome and chrome-deps rather the
   default action of an installation.
-U (or --unstable) will switch to unstable versions (google-chrome-unstable).

I would recommend you read the comments at the top of the script and inspect the code carefully since you need to run it as root. It will perform a fair number of downloads to obtain what it needs and if it finishes successfully, you should be able to run the "google-chrome" command (or select it from the Internet category in your GNOME main menu) as a non-root user.

The dropping of NPAPI support for plug-ins (especially Java)

In a stunningly stupid move, Linux Google Chrome 35 onwards no longer supports the NPAPI plug-in protocol used by almost all browser plug-ins, instead preferring the PPAPI protocol. The biggest impact this has is to disable Java applets inside the browser, so if you need to use Java applets regularly, I'm afraid I'd have to recommend switching browsers (e.g. to Mozilla Firefox) until there's a Linux Java implementation that supports PPAPI.

You can read more about this at the appropriate Google Chrome bugs (the main one and a merged one), plus there's a developer discussion about it. The claim is that less than 0.7% of Linux Google Chrome users run NPAPI plug-ins regularly, so Linux was deliberately targeted earliest (other platforms will drop support later in 2014). To be frank, this move is just as bad as dropping RHEL/CentOS 6 support (though RHEL/CentOS 7 mostly fixes that) - why do this when there's no Linux Java PPAPI support yet?

The crash on some systems

Some users (including me on my main desktop) have reported that Google Chrome 36 crashes on their system and others (including me in a VM) have been able to run that release fine. I tried it on fairly untouched (just yum updated and nothing else) 32-bit and 64-bit CentOS 6.5 GNOME desktop via VMs and live ISOs and sure enough, it does actually run, albeit with buggy recvmsg error messages on the console. This means something I've installed in my 64-bit CentOS 6.5 environment has caused version 36 to crash, whereas version 35 runs fine on it. It's no big deal - I'll just add a "clean" 64-bit CentOS 6.5 VM to my testing and I'll be moving to CentOS 7 at some point soon anyway.

The changelog

The TODO list

The compatibility note

Please note that RHEL/CentOS 6 and 7 references on this page should hopefully equally cover all RHEL/CentOS 6 and 7 derivatives. Note that I only use CentOS 6 myself (and CentOS 7 final in a VM) so can't guarantee the compatibility with those other derivatives, but I do actually perform brief testing on a Scientific Linux 6 VM as well. Oh and someone's bound to ask - no, the script won't work with RHEL/CentOS 5 or earlier.

The feedback

Any bugs, fixes, improvements or suggestions should be fed back to me, Richard K. Lloyd, at rklloyd@gmail.com but please note there is no warranty on this product whatsoever and the script itself is in the public domain. Bemusingly, one ultimate feedback was a tutorial video someone uploaded to YouTube!

The defence (no, it doesn't eat raw orphaned kittens)

Apparently one of the guys on the CentOS mailing list really doesn't like my script, claiming that it "consumes raw orphaned kittens" and "should be classified as a criminal offense". Here's my response:

The ChromeDriver server (Web app developers only)

If you're a Web app developer and have just installed Google Chrome via my script, you may also be trying to run the ChromeDriver server on RHEL/CentOS 6 to automate the testing of your app. Sadly, after downloading and unpacking it (and making sure you got the latest 32-bit or 64-bit version), you'll find it has a familiar library problem very similar to Google Chrome's. However, this is easily fixed by simply using the F15/F17 libraries from your Google Chrome installation:

export LD_LIBRARY_PATH=/opt/google/chrome/lib
./chromedriver
[Should output: Starting ChromeDriver (v2.9.248304) on port 9515]

The non-solution at Red Hat's Customer Portal

I was bemused to find this on the Red Hat Customer Portal. Basically, it says "Google Chrome doesn't install in RHEL 6", gives a bunch of failed yum install outputs and, er, that's it. Even funnier is that the right hand side of the page says "This solution has been verified to work by Red Hat Customers and Support Engineers for the specified product version(s)." :-) Maybe they need to link to this page...

The Chromecast

If you have a Chromecast, you can install the Google Cast extension in Google Chrome by going to the Extensions section of the Chrome Web store and searching for "Google Cast". You can then cast a tab from your RHEL/CentOS Google Chrome, though it can be laggy. More info (from a UK/Linux/Android perspective) about Chromecast can be found on my sister site.