User avatar
Posts: 11
Joined: Tue Nov 29, 2016 5:56 pm
Contact: Website

Running headless chromium and chromedriver

Wed Sep 27, 2017 6:20 pm

Hi, I am having problems getting this to work. More specifically, I can't get chromedriver to work.

Do I have to compile everything from scratch?

Posts: 1
Joined: Mon Oct 02, 2017 6:28 pm

Re: Running headless chromium and chromedriver

Wed Oct 04, 2017 7:32 pm


Since the chromedriver is not in the official raspbian repository, you have to get it from here: ... r/download
Unpack the file "chromedriver" from the archive to /usr/local/bin

Then follow these steps:
sudo chmod +x /usr/local/bin/chromedriver
sudo apt-get install libminizip1
sudo apt-get install libwebpmux2

If you are on Raspbian Stretch Lite (no desktop environment) you also have to install this package:
sudo apt-get install libgtk-3-0

In your code add these two arguments, when you start the driver:

See also my code below, section //Headless?:

Code: Select all

using System;
using OpenQA.Selenium.Chrome;

namespace WiControlForConnectBox.Selenium
	public class LibChrome : LibConnectBox
		public LibChrome (bool HeadlessMode)
			//Optionen einstellen
			var options = new ChromeOptions();

			if (HeadlessMode)
			//Treiber starten (chromedriver muss in /usr/local/bin kopiert werden)
			var driver = new ChromeDriver(options);
			//Timeout festlegen
			driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);

			//Treiber eintragen
			base.Driver = driver;
Best regards,

Posts: 1
Joined: Tue Feb 20, 2018 11:27 pm

Re: Running headless chromium and chromedriver

Tue Feb 20, 2018 11:28 pm

@chgruem, Thank you very much for this answer.
I've been searching for a way to set up selenium in my Raspberry for hours.
This was amazing, thank you

Posts: 1
Joined: Sun Oct 14, 2018 11:27 pm

Re: Running headless chromium and chromedriver

Sun Oct 14, 2018 11:51 pm

so one thing is that your code seems to be... C#?
using with python Ive been trying to achieve headless scrapping on raspberry pi 3 b+

Ive been following this steps which is unfortunately a closed thread ... driver_on/

somebody told me i need to put chromium and chromedriver on the same folder??? im actually confused in many aspects


might sound lame but since i did a

sudo mv /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver

does this mean

driver = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver')


driver = webdriver.Chrome('chromedriver')
? OR
driver = webdriver.Chrome()

Posts: 1
Joined: Fri Apr 10, 2015 3:21 am

Re: Running headless chromium and chromedriver

Thu Apr 02, 2020 3:08 am

Apparently the chromium-chromedriver is avaible through apt-get is the only solution that has worked for me. I guess it's easier because the package manager matches the versions [?]... not sure, but it worked.

Return to “Advanced users”