I want to update Chromedriver to the latest version.
How can I do this on the command line?
This should download the latest version of Chromedriver, and extract it to the correct location, with the correct permissions.
version=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE")
wget -qP /tmp/ "https://chromedriver.storage.googleapis.com/${version}/chromedriver_linux64.zip"
sudo unzip -o /tmp/chromedriver_linux64.zip -d /usr/bin
The permissions should be 755
by default, but if they aren't, you can run:
sudo chmod 755 /usr/bin/chromedriver
If you want a specific version, see the index page, or the website.
You can also edit the above commands to use LATEST_RELEASE_80
, if you wanted version 80, for example.
If you don't already have the latest version of Google Chrome, you may need to update it with:
sudo apt-get --only-upgrade install google-chrome-stable
sudo apt-get --only-upgrade install google-chrome-stable
LATEST_RELEASE
file. If you want a specific version, I also included instructions for that. They'll probably fix their problem in a week or two.
$ wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip
$ unzip chromedriver_linux64.zip
$ sudo mv chromedriver /usr/bin/chromedriver
$ sudo chown root:root /usr/bin/chromedriver
$ sudo chmod +x /usr/bin/chromedriver
Download chromedriver from https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
Unzip it and put it in location /usr/bin/chromedriver
and change its permission to 755 using chmod.
If you need this for chromium: Find your chromium Version here:
chromium-browser --version
Find the corresponding chromedriver Verion here: https://chromedriver.chromium.org/downloads
Then install as per MatzFans instructions.
I gave up using a downloaded independent Chromedriver. I'm using the Chromedriver that comes together with Chromium. This way they will always be in sync and (to answer the exact question) to update the chromedriver it's just necessary to update the Chromium version.
I've installed Chromium with snap:
snap install chromium
If I run:
snap info chromium
I see there are two commands, one for browser and the other for chromedriver:
commands:
- chromium.chromedriver
- chromium
All I have to do is run it, in my case I want to use port 4444:
chromium.chromedriver --port=4444