0

I'm stuck trying to get my Selenium script running on my raspberry Pi 4 running with raspbian. The script is running fine on my mac.

The problem is with setting up the webdriver. I tried installing several webdrivers, including chromedriver, geckodriver, operadriver and phantomjsdriver.

Whenever I'm trying to run the script (which I of course changed to the corresponding drivers) I'm greeted with the following error:

OSError: [Errno 8] Exec format error: 'operadriver'

Also trying to open the driver directly from the shell is resulting in an error:

pi@raspberrypi:/home/shares/users $ chromedriver    
bash: /usr/local/bin/chromedriver: cannot execute binary file: Exec format error

My research found some people who got it to work, but all the posts seemed quite old. Some where suggesting the error is pointing to the cpu architecture which is armv7l/armhf in my case.

So is it at all possible to get Selenium running on a pi these days? Has anyone got this to work?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Tobias Grunwald
  • 161
  • 1
  • 3
  • 14
  • looks like they have arm drivers available here: https://launchpad.net/ubuntu/trusty/+package/chromium-chromedriver You should match Chromium version with the driver version... and if the chromedriver version is old enough, you may need the older version of Selenium to go with it. – pcalkins Dec 10 '19 at 23:22

1 Answers1

0

This error message with operadriver...

OSError: [Errno 8] Exec format error: 'operadriver'

and this error message with chromedriver...

ash: /usr/local/bin/chromedriver: cannot execute binary file: Exec format error

...implies that the respective OperaDriver and the ChromeDriver binaries which were invoked was not in proper format.


On your system you have used the following WebDriver variants:

where the WebDriver variants matched the underlying architecture.


Now as you are using architecture, you have to download and use the relevant format and version of executables downloading it from WebDriver driver for the Chromium Browser

Note: It is to be noted that from geckodriver v0.24.0 onwards:

Removed

  • Turned off builds for arm7hf, which will no longer be released but can still be built from the source.

References

You can find a couple of relevant discussions in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352