17

I need to install chrome browser on centos 6.5, Here i need to automate some web gui. I have installed chrome driver. Can anyone please provide the steps and download link of chrome-61 and how to install it. My operating system does not have any Gui. Kindly provide the commands.

I am using java selenium.

Thanks in advance

vish
  • 901
  • 1
  • 7
  • 20

3 Answers3

43

Sadly, Google Chrome no longer supports 6.x. You need CentOS 7.x.

I used Cent-OS 7.4.* and it worked fine.

These are the steps to follow:

  • Download chromedriver: login to Linux machine and execute these commands:

    $ wget https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip
    $ unzip chromedriver_linux64.zip
    $ chromedriver --version
    ChromeDriver 2.40.565383
    

Make sure you're always installing the latest version!

  • Download Chromebrowser

    $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
    $ sudo yum install google-chrome-stable_current_x86_64.rpm
    
    $ google-chrome --version
    Google Chrome 67.0.3396.87
    
    $ yum install Xvfb
    
    $ ps -ef | grep Xvfb
    username 12988     1  0 Oct05 ?        00:00:02 Xvfb :99 -screen 0 1152x900x8
    
    $ yum install maven
    $ mvn -version
    Apache Maven 3.0.5 (Red Hat 3.0.5-17)
    
oldboy
  • 5,729
  • 6
  • 38
  • 86
vish
  • 901
  • 1
  • 7
  • 20
  • 15
    Why Xvfb? Shouldn't headless Chrome use some kind of internal framebuffer instead of relying on X11? – Juriy Feb 15 '18 at 10:43
  • You don't need Centos 7 -- see my answer below -- Chrome works well headless on Centos 6. – Wojtek Oct 22 '18 at 19:27
  • 1
    **1.** it is giving error `command chromedriver` not found. **2.** How to set Xvfb screen?When I executed this command it didnt show me screen size but appeared like this `19882 19405 0 16:26 pts/3 00:00:00 grep --color=auto Xvfb` – paul Oct 29 '18 at 10:57
  • I have this on centos7 Error: Package: google-chrome-stable-70.0.3538.110-1.x86_64 (/google-chrome-stable_current_x86_64) Requires: liberation-fonts – Edik Mkoyan Nov 28 '18 at 06:55
  • check this link http://dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64/ for specific versions for google-chrome – AATHITH RAJENDRAN May 17 '21 at 12:18
  • note: works fine without installing Xvfb and maven – Andrey Kotov Sep 09 '21 at 22:34
5

This is the guide to install Google Chrome on CentOS 6. Big thanks to the guys at Intoli.com!

It also works for Amazon Linux and Red Hat Enterprise Linux.

https://intoli.com/blog/installing-google-chrome-on-centos/

Wojtek
  • 436
  • 5
  • 7
  • 1
    you da real MVP – Painy James Apr 30 '20 at 07:56
  • Two years on and I'm not sure this works any more. Chrome flakes out with ``` google-chrome --headless --disable-gpu https://google.com [0105/235507.059608:ERROR:sandbox_linux.cc(378)] InitializeSandbox() called with multiple threads in process gpu-process. ``` or ``` google-chrome-stable --headless --disable-gpu --disable-software-rasterizer https://google.com [0105/235527.967960:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is ``` – Carlos P Jan 05 '22 at 23:57
0

Actually , There is a way to run both chrome and chromedriver on amazon linux, centos 6.x and rhel. basic idea to use libs from a newer os.

See the fully automated script here https://github.com/staier/chromedriver-centos6-installation

This one adds chromedriver installation to the script from the article:https://intoli.com/blog/installing-google-chrome-on-centos/

Sergey
  • 749
  • 6
  • 13