Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
822 views
in Technique[技术] by (71.8m points)

command line - How to update Chromedriver on Ubuntu?

I want to update Chromedriver to the latest version.

How can I do this on the command line?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Download Chromedriver

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.


Update to latest Chrome

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...