Error: Cask 'java7' is unavailable: No Cask with this name exists - homebrew

As one of the projects is using Java 1.7, I wanted the version to run the mrunit test cases manually. I got java8 installed in my machine and also wanted java7.
While I run brew cask install java7, it throws error message - Error: Cask 'java7' is unavailable: No Cask with this name exists.
As brew cask was suggested in blogs and in Stackoverflow, could you suggest how to install old java version?
echo JAVA_HOME
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
brew cask
Homebrew Cask provides a friendly CLI workflow for the administration
of macOS applications distributed as binaries.
Commands:
--cache display the file used to cache the Cask
audit verifies installability of Casks
cat dump raw source of the given Cask to the standard output
create creates the given Cask and opens it in an editor
doctor checks for configuration issues
edit edits the given Cask
fetch downloads remote application files to local cache
home opens the homepage of the given Cask
info displays information about the given Cask
install installs the given Cask
brew cask install java7
Error: Cask 'java7' is unavailable: No Cask with this name exists.
References: http://davidcai.github.io/blog/posts/install-multiple-jdk-on-mac/

Downloaded the package from Oracle site

Related

Installing old versions of llvm

I am trying to install old version of llvm via brew extract.
This is what I am running:
brew unlink llvm
brew tap-new llvm/llvm-project
brew extract --version='13.0.0' llvm llvm/llvm-project
brew install llvm#13.0.0
This is the error I get:
/usr/local/Homebrew/Library/Homebrew/utils/github/api.rb:311:in `raise_error': Validation Failed: [{"message"=>"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.", "resource"=>"Search", "field"=>"q", "code"=>"invalid"}] (GitHub::API::ValidationFailedError)
This is the url its trying to reach:
https://api.github.com/search/issues?q=llvm%4013.0.0+repo%3Allvm%2Fhomebrew-llvm-project+state%3Aopen+in%3Atitle&per_page=100
I have gone through this answer ,
I don't understand whose read permission is required. llvm-project is already a public repo.
#mehnaz can you please take a look. I wanted to comment on your question but being a new stackoverflow user I don't seen to have the privilege.

Return to dbt version 19.1

I am not sure how badly I have hosed this. I updated dbt to v20 globally too soon. I did uninstall v20. I need to return the project to version 19.1. I am running into errors doing this. As background I am running a virtual. I am on macos.
These two commands work as expected:
brew tap dbt-labs/dbt
brew unlink dbt
Then I run brew install dbt-labs/dbt/dbt#0.19.1
I get (I expect this) Warning: dbt-labs/dbt/dbt#0.19.1 0.19.1_1 is already installed, it's just not linked. To link this version, run: brew link dbt#0.19.1
Then I run brew link dbt#0.19.1 or brew link dbt-labs/dbt/dbt#0.19.1 and I get:
Error: Formulae found in multiple taps:
* dbt-labs/dbt/dbt#0.12.2-rc1
* fishtown-analytics/dbt/dbt#0.12.2-rc1
Please use the fully-qualified name (e.g. dbt-labs/dbt/dbt#0.12.2-rc1) to refer to the formula.
So I try brew link dbt-labs/dbt/dbt#0.12.2-rc1
Disclosure...I code dbt modules but I do not get too far into the installation since I rarely need to do it. Any help would be highly appreciated.
You might find this issue in the dbt-labs/dbt repo helpful.
TL;DR:
You may be running into issues due to the repo name change. It could help to do a full re-install, i.e.:
brew untap fishtown-analytics/dbt --force
brew tap dbt-labs/dbt
brew install dbt#x.y.z
You can then follow the instructions here as normal for managing several versions with homebrew.

start brew cask apps from terminal

I installed signal using brew cask (brew cask install signal)
I would like to be able to start the GUI app from terminal by typing signal(e.g.: to run the GUI of emacs [installed using brew cask] I can type emacs)
Maybe there is a way to edit the cask file to create this link?
I understand that I can create an alias in my zsh config file, but I was wondering if that is the correct approach.
You can use open to open any app on macOS, it's not related to homebrew, but you can extend your integration as you see fit. Example: open -a signal.

Homebrew: How do you specify a version using brew cask?

How do I specify a version number when installing something with brew cask install?
For recent versions of Homebrew, Jethro' instructions below may not work work, because we will get an error like:
Invalid usage: Non-checksummed download of <FORMULA_NAME> formula file from an arbitrary URL is unsupported.
I found a workaround:
Go to the Homebrew Cask search page: https://formulae.brew.sh/cask/
Type and find the application you are looking for
Click Cask code link
On Github click History button
Find the version you need by reading the commit messages and view the raw file. Confirm the version variable (normally on line 2) is the version you need.
Click on the name of the commit, then three dots and select View file
Right-click Raw button and Save Link As... to download the file locally
When downloaded, go to download directory cd Downloads/
Finally run brew install --cask <FORMULA_NAME>.rb
Voilà 😄
If you need some visual assistance check the screenshots here.
You can manually point brew at the ruby file for a specific version of a cask, using a git hash. This lets you control which version is installed.
For example:
Find the cask .rb file on the homebrew-cask git repo that you
want.
Get the commit hash, eg
cee7983cd95fc92fdc250fc509f2379cefe647fe in the example above.
Git may give you instructions to view the file history locally - eg git clone https://github.com/Homebrew/homebrew-cask.git git log master -- Casks/CASK_NAME.rb
Point brew at the file using the hash: brew cask install https://raw.githubusercontent.com/caskroom/homebrew-cask/cee7983cd95fc92fdc250fc509f2379cefe647fe/Casks/minikube.rb
The other answers are pretty heavy handed, an alternative is to use the homebrew/cask-versions tap which contains a list of the old (major) versions of casks.
To use them tap it with brew tap homebrew/cask-versions and then you can search for your cask again like brew search --cask yourformula and see if what you're looking for is there.
Or you can see the complete list of casks by clicking on Casks folder at https://github.com/Homebrew/homebrew-cask-versions .
If you run
brew edit [formula]
you can change the version that matches your operating system. If you know the checksum, enter that too. If not, just comment that line out with # and it will skip the check. Then run
HOMEBREW_NO_INSTALL_FROM_API=1 brew reinstall [formula]

brew doctor Error: "No available formula with the name "pkg-config" "

I just installed Homebrew on Windows using the Linux Bash Shell but I have this error when I run brew doctor :
Error: No available formula with the name "pkg-config"
what can i do?
First, update Homebrew so it is pulling from the right resources: brew update
Run brew doctor again.
If the same error occurs, try doing a brew search pkg-config and see which results come up. I've had cases where the path to the package was different than usual. Pick one of the search results, and then do a brew install with the package path from the search results: brew install /homebrew/searchresultpath/pkg-config
Hopefully the correct path for the extension will solve your problem.

Resources