Unable to install Dart 2.7.2 - dart

I'm trying to install Dart 2.7.2.
Initially I tried to install via:
brew install https://raw.githubusercontent.com/dart-lang/homebrew-dart/fed6de080aef54c4f1c1df732424df37cd3e5a3e/dart.rb
Which gives an error:
Calling Installation of dart from a GitHub commit URL is disabled! Use 'brew extract dart' to stable tap on GitHub instead.
Next approach, I downloaded the file at:
https://raw.githubusercontent.com/dart-lang/homebrew-dart/fed6de080aef54c4f1c1df732424df37cd3e5a3e/dart.rb
And then updated DEVEL block to HEAD block, then ran:
brew install --build-from-source ./dart.rb
And now I'm getting this error:
Error: invalid attribute for formula 'dart': version ("")
And I've no idea what to do now...or how to go from here. Any tips?

Related

Error: gobject-introspection: uninitialized constant Language::Python::Shebang

While executing the following command:
brew install opencv
I am encountered with the following exception:
Error: gobject-introspection: uninitialized constant Language::Python::Shebang
Could you please help me find the root cause for this and resolve it?
Language::Python::Shebang is the replacement for Language::Python.rewrite_python_shebang, which was deprecated in Homebrew 2.3.0
So you are likely using a version of Homebrew prior to 2.3.0 You can check your Homebrew version with brew --version.
Just doing brew update should update Homebrew to the latest version.
If you at some point added or changed a formula and worked locally on it you could be on a feature branch or your Homebrew working directory is changed so it does not update the master branch.
In these cases try the following:
cd /usr/local/Homebrew
git status
Discard or git stash your changes or git checkout master if you are on a feature branch
Once the working directory is clean you can brew update to update Homebrew

brew install yarn version

I tried using
brew install yarn#1.7.0 --without-node
or
brew install yarn#1.7.x --without-node
But I get the following error
Error: No available formula with the name "yarn#1.7.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
I presume its possible to install different versions of yarn using brew ?
I had the same issue and wanted to install yarn via brew for various reasons. Honestly the only way is to use the actual link to the yarn.rb file in the Homebrew Repo for the version you want. The easiest way to find the .rb file through git is to check out the PRs in Git for yarn in the homebrew repo.
Before doing this though, run brew unlink yarn in order to allow an older version to be installed while keeping the newest version.
Then look up the PR of the version you want, here's a link to make your life easier.
Click the version you want and go to Files Changed tab. Click on View File button. Then click on Raw button and then copy the URL of this raw file
After you get that link, type in your terminal brew install [link] and you should be set
You can then use brew list --versions yarn to check your installed versions and brew switch to switch versions. You should have both the latest version you previously had installed and the version you just installed.
Some of the above answers don't seem to work anymore. Here is how I was able to install a specific version in April 2021:
brew unlink yarn#1.6.0 (If you already have a version installed)
brew extract --version 1.22.4 yarn homebrew/cask
brew install yarn#1.22.4
yarn -v
You can also use yvm, a yarn version manager instead of homebrew to install a specific or multiple versions of yarn
https://yvm.js.org/docs/overview
Enables easy switching between yarn versions, like nvm does for node
Hope this works for you guys.
To reinstall run below.
// Note:(updating homebrew) for Mac users.
brew install -g yarn
if yarn is still not found
brew reinstall yarn
As per official github page https://github.com/yarnpkg/yarn/issues/599 you should use "brew install -g yarn" to install yarn using brew.
PS: I've installed Xcode and gcc before running above command as i ran into few issues when executed above command.
You could also use yarn policies set-version <version>, but it has a caveat; it will "check in your Yarn release within your repository. Once you run it, your configuration will be updated in such a way that anyone running a Yarn command inside the project will always use the version you set - and this transparently."
You might not want to have the Yarn release in your repository.
Official doc

Installing older version of Elasticsearch

Running brew install elasticsearch#2.0.0, I'm getting:
Error: No available formula with the name "elasticsearch#2.0.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
How do I go about installing elasticsearch#2.0.0 in my Rails App.
Homebrew does not currently support 2.0.0 of Elasticsearch. If you run:
brew search elasticsearch
You will see the currently supported version of Elasticsearch that homebrew allows you to install. At the time of this question, the only version in the 2.x series that is supported by homebrew is 2.4.
If you must have 2.0.0, you can always download it directly and install it yourself. You can just download the version during your install script and run the install commands.
If you must use 2.0.0 and you must user homebrew, you can always create a custom formula. Just run the command:
brew create <url to zip>
Then you modify the resulting ruby file to run the correct install commands (hint: you can copy from the 2.4 formula).

Unistall error using home-brew -> error using brew prune

I have Paste installed and want to uninstall it, currently running macOS High Sierra.
I have tried using the $ brew uninstall Paste and it gets returned with Error: No such keg: /usr/local/Cellar/paste.
After that I used $ brew update of which everything is up-to-date.
So after that I used $ brew doctor which returned
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Broken symlinks were found. Remove them with `brew prune`:
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStd-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStdN-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruPro-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruProN-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Bold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Medium
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Demibold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Medium
However, when I try and use $ brew prune I get returned with
Error: Permission denied # unlink_internal - /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
Can anyone help with this issue?
Simply run:
brew uninstall paste
You're getting the error: No such keg: /usr/local/Cellar/pastewhenbrew uninstall Past because there are no brew formulae installed or in the official Homebrew repository named paste.
brew install paste
Error: No available formula with the name "paste"
I guess you've installed it using cask:
brew cask install paste
If you try to uninstall it using brew you'll get that error:
brew uninstall Paste
Error: No such keg: /usr/local/Cellar/paste
To uninstall paste simply use brew cask instead:
brew cask uninstall paste

SHA1 error when using brew install ruby-build

I was using Linuxbrew(which is a linux equivalent of homebrew) to install "ruby-build"
command used:- brew install ruby-build
and here is the error that i got,
Error: SHA1 mismatch
Expected: 2599afa039d2070bae9df6ce43da288b3a4adf97
Actual: 6d840506239fc0b47ad5c1b14bd5e3e0edbeaa60
Archive: /home/User1/.cache/Homebrew/makedepend-1.0.5.tar.bz2
To retry an incomplete download, remove the file above.
Later I tried deleting the makedepend-1.0.5.tar.bz2 file and run the above command again, still the error persists.

Resources