21

My current version is 81.0.4044.69 and I want to update to the latest version 83.0.4103.39

When I open Terminal and I do: brew cask install chromedriver

It says: Warning: Cask 'chromedriver' is already installed.

How can I update to the latest version 83.0.4103.39?

Tony
  • 7,767
  • 2
  • 22
  • 51

6 Answers6

61

UPDATE: Now you can also do:

brew update
brew upgrade chromedriver

or

brew update
brew upgrade --cask chromedriver

Also be aware that after each upgrade you will get again a system warning when using the chromedriver for the first time so you need to click Cancel in the warning and then go to "Preferences => Security & Privacy" and click "Allow Anyway" to accept the risk. Then on the next run, you'll have to click "Open" once.


Note: The answer below was given for an older version and may not work anymore


I found out that I should do:

brew update
brew cask upgrade chromedriver

Another option is to uninstall and install it again like this:

brew cask uninstall chromedriver
==> Uninstalling Cask chromedriver
==> Unlinking Binary '/usr/local/bin/chromedriver'.
==> Purging files for version 81.0.4044.69 of Cask chromedriver

brew cask install chromedriver
==> Downloading https://chromedriver.storage.googleapis.com/83.0.4103.39/chromedriver_mac64.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'chromedriver'.
==> Installing Cask chromedriver
==> Linking Binary 'chromedriver' to '/usr/local/bin/chromedriver'.
  chromedriver was successfully installed!

Now:

chromedriver --version
ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416})
abhchand
  • 515
  • 6
  • 13
Tony
  • 7,767
  • 2
  • 22
  • 51
8

I would recommend start using webdriver-manager:

pip install webdriver-manager

what I prefer mostly and use it like:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())

with that package you should not worry about version of chromedriver, even though, you can even choose particular chrome driver version:

driver = webdriver.Chrome(ChromeDriverManager(version='86.0.4240.22').install())

it is not the solution of the ticket, but it makes live easier working with chromedriver

Vova
  • 3,117
  • 2
  • 15
  • 23
6

I have recently have issues where I would receive a warning about chromedriver's developer not being trusted. To resolve this I use brew info chromedriver which gives the directory for chromedriver. Change into that directory and type ls -l and if the code like drwxr-xr-x has an @ at the end, that means your mac has quarantined that file. To pull it out of quarantine, type xattr -d com.apple.quarantine chromedriver. Then you should be good to go.

Jim Szalewski
  • 71
  • 1
  • 1
  • 1
    if chrome driver 100.0.4896.60, then: cd /usr/local/Caskroom/chromedriver/100.0.4896.60 xattr -d com.apple.quarantine chromedriver – Goaul Apr 06 '22 at 21:08
  • Simplest way to pull any chromedriver version from quaratine: `xattr -d com.apple.quarantine $(which chromedriver)` – ronkot Aug 03 '23 at 08:33
5

Uninstalling & installing the chromedriver worked -

brew uninstall chromedriver
brew install --cask chromedriver
RJ Adriaansen
  • 9,131
  • 2
  • 12
  • 26
Sankeerna Reddy
  • 161
  • 2
  • 8
3

Now its just brew upgrade chromedriver no longer cask

Matt Kennedy
  • 415
  • 3
  • 9
3

When I initially ran the following commands,

brew upgrade chromedriver 
brew upgrade --cask chromedriver 
brew uninstall chromedriver

I got the error below.

Error: Cask 'chromedriver' is not installed.

So I had to remove the chromedriver not managed by Homebrew first.

rm `which chromedriver` 

After that, brew install chromedriver successfully installed the latest version.

Big Pumpkin
  • 3,907
  • 1
  • 27
  • 18