How to update chromedriver to the latest version on MacOS using homebrew? - macos

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?

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})

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

Now its just brew upgrade chromedriver no longer cask

Uninstalling & installing the chromedriver worked -
brew uninstall chromedriver
brew install --cask chromedriver

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.

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.

Related

Homebrew node installation fails on cannot link c-ares

If I run brew install node I get this error:
==> Installing dependencies for node: c-ares, icu4c, libnghttp2, libuv and openssl#1.1
Error: Cannot link c-ares
Another version is already linked: /usr/local/Cellar/c-ares/1.17.1
Anybody know how to resolve this?
Hm, it appears Homebrew tried to upgrade c-ares from version 1.17.1 to 1.18.1 but failed for some reason. Try running brew upgrade c-ares before brew install node.
If that doesn't work, what is your output for brew list --versions c-ares? Perhaps you have multiple c-ares versions installed. If that is the case, run brew unlink c-ares to unlink the old version and then brew link c-ares to link the newer one. The old version can be uninstalled by running brew cleanup c-ares

Can't remove old version of ChromeDriver on MacOS

I have a very annoying problem with ChromeDriver. I need to use version 2.36, but I currently have 2.35.528157 (when doing chromedriver -v).
I have already done:
brew upgrade chromedriver
Which ran successfully, however according to my terminal, I still have 2.35.528157
I then did a
brew cleanup chromedriver
which got rid of versions 2.34 and 2.35 according to its logs, however when I do chromedriver -v I still get 2.35.528157.
If I do: brew list chromedriver, all I get is the following:
/usr/local/Cellar/chromedriver/2.36/bin/chromedriver
/usr/local/Cellar/chromedriver/2.36/homebrew.mxcl.chromedriver.plist
Am I missing something?
brew uninstall --cask chromedriver
I had originally installed it through npm, so I suppose that was the one taking priority.
I could not update it via npm for some reason, so I just downloaded the latest version of ChromeDriver. Deleted the old version of the file in my npm directory, and put the new one in its place. Not sure if it's the best practice or the actual solution but at least I got it working.
I uninstall the old version as:
brew cask uninstall chromedriver
And then install last ( needed ) version by
brew cask install chromedriver
So, right now my version is ok:
chromedriver --version
ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103#{#416})
And Selenium works properly

How do I install the latest developer package for wine with homebrew? (wine-3.0-rc2)

When I type in:
brew install wine
That should install Wine 2.0.3, right? (the latest release)
But I want to install a specific version of wine: wine 3.0 rc2
What would the command to do this be if I'm using homebrew? I've tried
brew install wine-devel
But it gives me this error:
Error: No available formula with the name "wine-devel"
Any help? Thanks!
Currently wine-devel has been moved to caskroom/versions. Therefore in order to install wine-devel you have to
Tap caskroom/versions, by running brew tap caskroom/versions
Update homebrew (...just to be sure) by running brew update
Finally install wine-devel by running brew install caskroom/versions/wine-devel
caskroom/versions was moved to homebrew/cask-versions.
The following will work:
brew tap homebrew/cask-versions
brew install homebrew/cask-versions/wine-devel
You will be asked for your password.
Then you should be able to start executables as follows:
wine /path/to/app.exe
I was trying to install wine-devel, but ran into a similar problem. It seems that the answers here may each have been relevant on a different year, as the casks have moved around back and forth. So here's the latest on the situation, and some info on how to handle it in future.
The official instructions (as of 4th April 2020) say to run brew cask install wine-stable. However, that leads to an error:
$ brew cask install wine-stable
Error: Cask wine-staging exists in multiple taps:
homebrew/cask-versions/wine-staging
caskroom/versions/wine-staging
This means that two potential casks were found, each with the same name, yet each on a different repository, and Homebrew was unsure which one to install.
Running this command gave me a clue about what was going on:
$ brew tap caskroom/versions
Error: caskroom/versions was moved. Tap homebrew/cask-versions instead.
So I learned that you can untap third-party repositories, and untapped the one that the message seemed to advise not to tap WINE casks from.
$ brew untap caskroom/versions
Untapping caskroom/versions...
Untapped 156 casks (463 files, 56.7MB).
$ brew cask install wine-stable
... Success!
To install the development version just pass --devel
brew install --devel wine

Trouble installing scala on a mac

I installed brew and installed java, then tried installing Scala using the following command. I got the error
brew cask install scala
Error: Cask 'scala' is unavailable: No Cask with this name exists. Did you mean one of:
scala-ide
Error: Install incomplete.
Then I tried using this command brew install Caskroom/cask/scala-ide. Then I installed spark and SBT. Now the issue is I cannot open Scala. I can open spark, but not Scala. But brew confirms that Scala is installed.
I try this command
brew install Caskroom/cask/scala-ide
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
getdns
==> brew cask install Caskroom/cask/scala-ide
Warning: Cask 'scala-ide' is already installed.
To re-install scala-ide, run:
brew cask reinstall scala-ide
How do I open Scala if it is already installed.

Can't install imagemagick with brew on Mac OS X mavericks

I am using Homebrew v0.9.5 on my Mac OS X version 10.9.4
When I run the command: `brew install imagemagick, this error occurred.
$ brew install imagemagick
==> Installing dependencies for imagemagick: libpng, freetype
==> Installing imagemagick dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
I have added --disable-openmp option, it also doesn't go well.
$ brew install imagemagick --disable-openmp
brew doctor command result has no problem.
$ brew doctor
Your system is ready to brew.
Have you tried a
$ brew update
$ brew install imagemagick --disable-openmp --build-from-source
Apparently that seemed to fix it for me on Mac OS 10.8 (Mountain Lion). Previously I checked out the latest imagemagick brew recipe with "brew versions imagemagick" and "git checkout e68e443", see here and here
I'm not certain whether the source of my problem was the same as the OP's, however (though this has an accepted answer already) I'll post this in case this solution works for others.
Using brew install imagemagick, I would encounter the following error:
curl: (52) Empty reply from server Error: Failed to download resource
"libpng" Download failed:
https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz
Which is similar, if less specific than the OP's message.
As it turned out, I already had a previous version of libpng installed (version 1.5.7). I then ran:
brew upgrade libpng
Followed by another brew install libpng, and this time it succeeded, as it now had the correct version needed.
This problem also occurs because https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz has a badly configured SSL certificate. Open the link in your browser and see if your browser complains.
If that's the case, you can manually download the file to /Library/Caches/Homebrew and run again.
Source: https://github.com/Homebrew/homebrew/issues/36703
For me it was upgrading to El Capitan. I found the simplest solution was to force remove homebrew:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
then to re-install it:
sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
then install imageMajick:
brew install ImageMagick
Depending on your setup you may not want to sudo. For me, its fine. Enjoy a snack while you manipulate images.
In my case the url was simply not correct, with which homebrew wanted to download the required file. I looked it up here http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.16/ by myself and copied it to /Library/Caches/Homebrew like #Dan suggested.
I then run brew install libpng again and it worked.
Follow this:
brew install imagemagick#6
Add below lines in to ~/.bash_profile file
export LDFLAGS="-L/usr/local/opt/imagemagick#6/lib" export
CPPFLAGS="-I/usr/local/opt/imagemagick#6/include" export
PKG_CONFIG_PATH="/usr/local/opt/imagemagick#6/lib/pkgconfig"
Install Rmagick
source ~/.bash_profile
gem install rmagick
If you are an Anaconda/Miniconda user on Mac OSX or Linux, you can install packages like imagemagick using conda.
conda install -c conda-forge imagemagick
https://anaconda.org/conda-forge/imagemagick

Resources