Search code examples
versionchromium

(Yum) How can you find out which version of Google Chrome you have when it is installed remotely (i.e. you have to run it from the command line)?


I want to run Selenium Webdriver in a python script, to use Google Chrome. But on the chromedriver downloads page (https://sites.google.com/a/chromium.org/chromedriver/downloads) you have to know your version of Google Chrome.

I do have Google Chrome installed on my AWS instance, but when I try to run it remotely just to find out what version it is, I get a segmentation fault:

From my /usr/bin folder:

[ec2-user@ip-xxx-xx-xx-xxx bin]$ ./google-chrome --version
Segmentation fault

How can you run it remotely from the command line like that (when it is installed remotely), just to find out what version you have?

Or maybe the version is specified somewhere else, so you don't have to run it from the command line?


Solution

  • You can try to identify the version via package manager:

    yum list installed|grep chrome
    

    or

    dpkg -l|grep chrome
    

    Depending on your operating system.

    If this is not possible, get it out of the strings of the binary:

    $ strings /opt/google/chrome/chrome | grep -E '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,4}\.[0-9]{1,4}$'
    7.9.317.33
    127.0.0.1
    79.0.3945.130
    0.1.0.0
    224.0.0.251
    0.46.0.4
    8.8.8.8
    0.0.0.0
    239.255.255.250
    127.0.0.1
    0.0.0.0
    

    In my case it is version 79.0.3945.130

    Problem is to find the binary of the file - on my system it is symlinked to a script. In the same folder where is the script, also the binary resists.