selenium - problem with loading

Problem: selenium fails to start Firefox with following error:

'The browser appears to have exited before we could connect.
The output was: Failed to dlopen /usr/lib/\ndlerror
says: /usr/lib/ wrong ELF class: ELFCLASS32\n'

In my case it was reproduced on the 64 bit machine with Amazon Linux AMI. The problem itself is known and there is an issue in selenium tracker.

It is because x_ignore_nofocus library tries to load 32bit version of the libX11 instead of 64bit. In my system there are following versions of libX11:

    $ find / | grep
    /usr/lib64/       <-- symbolic link to `'
    /usr/lib64/ <-- ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
    /usr/lib/          <-- symbolic link to `'
    /usr/lib/    <-- ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

At the right side (after “<–") is an output of file /usr/libX/


Change symbolic link /usr/lib/ to point to the 64-bit version /usr/lib64/

    $ mv /usr/lib/ /usr/lib/
    $ ln -s /usr/lib64/ /usr/lib/

After that selenium started to work.

bug report.

profile for Boris Serebrov on Stack Exchange, a network of free, community-driven Q&A sites