Trouble installing scala on a mac - macos

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.

Related

How to install specific version of Virtualbox with homebrew?

I have an issue with last version of virtualbox on MacOS M1, and apparently, I can use an older version to fix it
I tried :
brew cask install virtualbox#6.1.26
brew cask reinstall virtualbox#6.1.26
brew reinstall virtualbox#6.1.26
brew install --cask virtualbox#6.1.26
brew install virtualhost.sh#6.1.26
I also tried to install latest virtualbox with
brew reinstall virtualbox
and switch the version with :
brew switch virtualbox 6.1.26
But nothing works, any idea ?
You have to follow a three stepped guideline :
Cask file
Modify the Cask file
Reinstall your package
This link is helping you during the process :
Homebrew Cask to install specific version of package

Can't install emacs in Homebrew

$ brew install emacs
Updating Homebrew...
Warning: Treating emacs as a formula. For the cask, use homebrew/cask/emacs
==> Downloading https://homebrew.bintray.com/bottles/emacs-27.1.mojave.bottle.1.tar.gz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/edc19e2cbf4d5136f0e31adfb9c57161b65dd8163f861a92e10bfd617d1d611c--emacs-27.1.mojave.bottle.1.tar.gz
==> Pouring emacs-27.1.mojave.bottle.1.tar.gz
==> emacs cask is installed, skipping link.
==> Caveats
To have launchd start emacs now and restart at login:
brew services start emacs
Or, if you don't want/need a background service you can just run:
emacs
==> Summary
🍺 /usr/local/Cellar/emacs/27.1: 4,009 files, 104.0MB
==> Upgrading 1 dependent:
cask 0.8.4 -> 0.8.5
==> Upgrading cask 0.8.4 -> 0.8.5
==> Downloading https://github.com/cask/cask/archive/v0.8.5.tar.gz
==> Downloading from https://codeload.github.com/cask/cask/tar.gz/v0.8.5
######################################################################## 100.0%
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/emacs not present or broken
Please reinstall emacs. Sorry :(
How to fix this?
By looking at the output, it seems emacs actually got installed:
==> Summary
🍺 /usr/local/Cellar/emacs/27.1: 4,009 files, 104.0MB
You should be able to use it straight away.
If you prefer a GUI version, you can install it with:
brew install --cask emacs
The problem
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/emacs not present or broken
Please reinstall emacs. Sorry :(
It's another tool, cask, which fails to install:
It cannot find the emacs dir under /usr/local/opt/emacs.
Homebrew installed it at /usr/local/Cellar/emacs/27.1.
The fix
You can fix it by:
(Recommended) Creating a symlink in /usr/local/opt/ to emacs directory
$ brew link --overwrite emacs # if it complains about relinking, run brew unlink emacs && brew link emacs instead
$ brew install cask
(Alternative) If the previous point didn't help, ignoring dependencies while installing cask
$ brew install cask --ignore-dependencies
Please let me know if it helped

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.

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

Get error while cask, brew-cask

I want install search engine elasticsearch in OS X 10.11.6
I read some blog
in my command line
brew install elasticsearch
and it show error(needs java)
elasticsearch: Java 1.7+ is required to install this formula.
You can install with Homebrew Cask:
brew install Caskroom/cask/java
You can download from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.
I flow this blog's solution
brew tap caskroom/cask
and show
Warning: Tap caskroom/cask already tapped.
second command
brew install brew-cask
it show error
Error: No available formula with the name "brew-cask"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
This formula was found in a tap:
Caskroom/cask/brew-cask-completion
To install it, run:
brew install Caskroom/cask/brew-cask-completion
==> You haven't updated Homebrew in a while.
A formula for brew-cask might have been added recently.
Run `brew update` to get the latest Homebrew updates!
and i install java
brew cask install java
but cask doesn't install
==> brew cask install Caskroom/cask/brew-cask-completion
Error: Unknown command: cask
and Some blog give me some advice
brew upgrade brew-cask
it show error
Error: No available formula with the name "brew-cask"
if fact I can't understand why my mac can't find cask...
please somebody helpme
Problem Solved I need to brew update
brew update
Try this works for me.
I thought it's brew update install package command,
brew install --cask java

Resources