42

I want to install chromedriver in one of the AWS EC2 instance which is linux(Red Hat Enterprise Linux Server release 6.7 Santiago - 64 bit). While installing the chromedriver, we ran into issue due to missing packages. I could find the package here but this in turn requires many other packages. Using any other AMI is not an option.

Error is -

error while loading shared libraries libgconf-2.so.4 cannot open shared object file
Pankaj
  • 3,512
  • 16
  • 49
  • 83
  • 1
    I am trying to do the same in AWS Linux AMI. Whenever I try to do yum provides */libgconf-2.so.4 I get below error : yum provides */libgconf-2.so.4 Loaded plugins: priorities, update-motd, upgrade-helper No matches found – Prasath Govind Sep 20 '17 at 17:41

3 Answers3

63

I am using Ubuntu x64 and yum didn't work for me. But I found somebody mentioning simply use $sudo apt install libgconf-2-4 worked for me to install the libgconf.

Keval Domadia
  • 4,768
  • 1
  • 37
  • 64
JCQian
  • 819
  • 6
  • 10
25

Please ask yum for the file, libgconf-2.so.4 : $ yum provides */libgconf-2.so.4

Install GConf2 : # yum install GConf2

Packages http://mirror.centos.org/centos/6.8/os/ ... and updates http://mirror.centos.org/centos/6.8/updates/

The chromedriver depends on the same packages / files as GConf2, and then some. Please see for yourself : $ ldd chromedriver , where 'chromedriver' is the unzipped executable.


EDIT :

Solution for the chromedriver issue : Install a chromedriver for RHEL 6, chromedriver-31.0.1650.63-1.el6.x86_64.rpm https://drive.google.com/file/d/0B7S255p3kFXNX1c0UWlGOWpZOHM/view?usp=sharing

Please download the package, and 1) cd Downloads/ 2) yum install chromedriver-31.0.1650.63-1.el6.x86_64.rpm ... and you have /usr/local/bin/chromedriver


P.S. : The EL6 chromedriver was built from the source package chromium-31.0.1650.63-1.el6.src.rpm


Knud Larsen
  • 5,753
  • 2
  • 14
  • 19
  • Tried but now ran into another dependency issue - /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./chromedriver) . – Pankaj Jun 03 '16 at 22:43
  • GLIBCXX_3.4.15 is an object in libstdc++.so.6.0.15 ( gcc version 4.5 ). Either compile gcc version 4.5 or 4.6 or 4.7 to get a new ibstdc++.so.6***. Or plug out llibstdc++.so.6.0.17 from libstdc++6-4.7.4_20140612-2.1.x86_64.rpm http://download.opensuse.org/repositories/devel:/gcc/SLE-11/x86_64/libstdc++6-4.7.4_20140612-2.1.x86_64.rpm . libstdc++.so.6 -> libstdc++.so.6.0.17 works very well. Tested with Firefox and chromedriver : CentOS6.8 - 64. - – Knud Larsen Jun 04 '16 at 10:41
  • looked at the gcc version on the box - rpm -qa | grep -i gcc libgcc-4.4.7-16.el6.x86_64 .. I already have gcc 4.7.7. But still when I try starting chromedriver..runs into the same error... What do you mean by plug out llibstdc++.so.6.0.17..I'm not clear with this.. – Pankaj Jun 06 '16 at 22:52
  • Changing the system llibstdc++ appears not to be a good idea. ( The g++ compiler won't work.) Please see the "chromedriver solution" in the edited post. - – Knud Larsen Jun 14 '16 at 19:11
  • you saved my life! I've been looking for a cause for an hour... even this post is old the simple `ldd` command helped me to find what was missing and grab it from package installer `cache` – JoKeR Apr 27 '17 at 00:36
0

You might want to read this CentOS thread about your GLIBCXX_3.4.15. Especially apropos is this answer on the thread, especially the FAQ it references.

CentOS (which aims to be as compatible with RHEL as possible) is a curated LTS distribution (as is RHEL). You might find a version of chromedriver compiled for RHEL 6 in one of the many repositories. If not, you'll probably have to build it yourself.

ldav1s
  • 15,885
  • 2
  • 53
  • 56