Can't remove old version of ChromeDriver on MacOS - 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

Related

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

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.

When brew does not have latest package version

How do I force brew to install latest version of neovim (ver 0.5.0) when brew's formula only has 0.4.3?
I have tried:
brew update
brew upgrade neovim
And it says: Warning: neovim 0.4.3 already installed
I went brew's git repo and checked on neovim formula. Brew has neovim's 0.4.3, not 0.5.0. So brew update/upgrade is not going to help. https://github.com/Homebrew/homebrew-core/blob/master/Formula/neovim.rb
I'm thinking of just downloading neovim from neovim repo and installing it manually, but I'm afraid I'll have to manage updates and dependencies if I do this manual install.
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz
tar xzf nvim-macos.tar.gz
./nvim-osx64/bin/nvim
What should I do?
I fixed this with the following steps:
1) Unlink old neovim version:
brew unlink neovim ... and 2)
Install pointing to head:
brew install --HEAD neovim
... This installed neovim 0.5.0.
According to the brew doc, brew install --HEAD will install the master branch of the package. For neovim, it means that the latest version of neovim will be built for you, which may not be stable enough or even compile.
I suggest you install the nightly binary version of neovim. The best way to get the nightly version is to download from the binary release. No dependency is required to install if you download the binary release.
If you don't want to do this manually, you can write a bash script to automate this.

How to install specific version of maven in mac using brew command

I want to install specific version (3.0.5) of maven in my using brew command. I tried the following command which is failed with Error: No available formula with the name "3.0.5"
brew install maven 3.0.5
Any ideas?
brew search maven
lists all maven versions as below
maven maven-completion maven-shell maven#3.0 maven#3.1 maven#3.2 ✔ maven#3.3
brew install maven#3.0
Installs maven 3.0.5 on my mac.
brew install https://raw.github.com/Homebrew/homebrew-versions/master/maven30.rb
it will then use a different Homebrew's formular which will give you the maven 3.0.5 instead
I tried this last on my Mac and it works installing the 3.0.5!
If none works and you can use similar version try the below:
brew install maven30
What OS do you have? On OS X 10.9 you should use brew install maven30 since maven 3.1.1 seems to be buggy.
By the way:
Using Homebrew:
you#host:~$ brew install maven will install Maven 3.3.1 (3/24/15)
you#host:~$ brew install maven30 will install Maven 3.0 which should be
better
If you got a 404 error, try doing a brew update just before.
If always nothing, try to recover the installation:
cd ~/Documents
mkdir BrewRecovery
cd BrewRecovery
curl -OL https://gist.githubusercontent.com/ilovezfs/21a741a78927a17b9ad1/raw/fef5866ccd51f07a9635fcb1096e8df0479af01b/Brewfile-deanchester.brewfile
md5 Brewfile-deanchester.brewfile
In general,
brew is unable to install any specific version such as 3.8.1
as it only gives few versions as the available options.
The only way then to install would be do it manually.
Also don't forget to update Path variable in your mac.
If you run brew install maven, the latest stable version would be installed.
If you want to install the previous versions you can run
brew install maven#versionNumber where versionNumber is your desired version.
Not all versions are available here in,
Also you may try hitting the website with the required version and download the file its available
https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/.
where you may substitute 3.6.1 with the version you want to run.

Missing formulas in broken homebrew

After doing a Ctrol+C on a 'brew update' command, can't see all available formulas (searching with brew search command, E.g any php package)
I've tried with brew doctor and cleanup commands without any luck.
How can I fix this without uninstalling brew and all its programs?
I'm wondering about this as well. I switched to an older version of scala, now the formula is missing and I can't install the latest version. I'm going to uninstall and reinstall homebrew for a quickfix for now.

SVN using wrong sqlite version

when running my svn from /usr/local/bin/ it says:
svn: E200029: Couldn't perform atomic initialization
svn: E200030: SQLite compiled for 3.7.13, but running with 3.6.12
sqlite3 --version gives me 3.7.13
What went wrong and how can I fix it?
I'm on Mac OS X (10.6.8).
//edit1:
/usr/local/bin/sqlite3 --version 3.7.13
/usr/bin/sqlite3 --version 3.7.13
//edit2: I "fixed" this by installing svn via homebrew and using /usr/local/bin/svn explicitly
Let me sum up the fixes and suggestion from the answers below:
(please upvote the corresponding answer)
For Mac users:
(re-)install svn via homebrew or whatever you use (you may need to brew link --force sqlite3)
For Fedora users:
try yum update sqlite3 or yum install sqlite
I experienced the same issue, I solved downloading http://www.sqlite.org/sqlite-amalgamation-3.7.6.3.tar.gz, unpacking the archive using tar/gunzip and coping sqlite3.c from the resulting directory into $svn-src-folder/sqlite-amalgamation/sqlite3.c.
Run configure/make/sudo make install and you should solve.
I had brew, svn 1.8, working fine in OSX 10.8.
I upgraded to 10.9, broke. For some reason the symlinks brew makes in /usr/local/bin were removed by the 10.9 installation?
brew update didnt fix.
brew install svn fixed svn, or so I thought.
Then actually using svn 1.8 (/usr/local/bin first in my path) I also had the above sqlite error message. A newer sqlite being in /usr/local/Cellar, but not symlinked in /usr/local/bin or anything.
brew install sqlite3 ... didnt fix it. And I noticed brew says for this component it doesnt symlink. ok.
BUT, after that reinstall, a further reinstall of svn
brew svn uninstall
brew svn install
DID fix it. dont know why. Now can svn co successfully.
After re-linking subversion, I had also to re-link sqlite3
brew link --force sqlite3
It means subversion was compiled with SQLite version 3.7.13, but now you are running SQLite 3.6.12.
All you need to do is recompile/reinstall your subversion again.
update sqlite3!!
I had similar issue on Fedora Core 20
Did the following:
yum update sqlite3
For me, yum install sqlite in fedora fixed the problem.

Resources