How to install Ansible20 via Homebrew on macOS - macos

I've done this many times up until a couple of months ago.
The steps seem to have changed since versions is now deprecated?
1) brew tap homebrew/versions
2) brew search ansible
3) Returns ansible#2.0 as an option
4) brew install ansible20
5) Finally brew install homebrew/versions/ansible20
However I am now getting the following response
Warning: Use ansible20 instead of deprecated homebrew/versions/ansible20
Error: No available formula with the name "homebrew/core/ansible20"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
Does /core/ not have the same formulae? What happened to versions?

You can use ansible#2.0 in core, in place of ansible20.
Just run brew install ansible#2.0.
Excerpt from https://github.com/Homebrew/homebrew-versions:
This tap was deprecated because homebrew/core has started to support multiple versions. All widely used, buildable formulae will be migrated to homebrew/core.
Learn more about this migration in the Versions documentation.
Excerpt from http://docs.brew.sh/Versions.html ("the Versions documentation" mentioned above)
In Homebrew/versions the formula for GCC 6 was named gcc6.rb and began class Gcc6 < Formula. In Homebrew/core this same formula is named gcc#6.rb and begins class GccAT6 < Formula.

Related

Homebrew: Error running 'requirements_osx_brew_libs_install gcc#6' on Mac10.13.6

I can't install ruby 3.0.0 through my powershell, when I try rvm install 3.0.0 I receive a beautiful error:
Error running 'requirements_osx_brew_libs_install gcc#6',
please read /Users/ben/.rvm/log/1673079096_ruby-3.0.0/package_install_gcc#6.log
Requirements installation failed with status: 1.
I feel like I've tried everything to resolve this problem but without success.
-This is my gcc version:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
-homebrew version:
Homebrew 3.6.17-66-g974984d Homebrew/homebrew-core (git revision 0149ce7e63e; last commit 2023-01-07)
-rvm version:
rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
-ruby version:
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
-which ruby:
/usr/bin/ruby
And when I run rvm install 3.0.0 this is what I receive:
Error: Invalid usage: This command requires at least 1 text or regex argument.
Usage: brew search, -S [options] text|/regex/ [...]
Perform a substring search of cask tokens and formula names for text. If
text is flanked by slashes, it is interpreted as a regular expression. The
search for text is extended online to homebrew/core and homebrew/cask.
--formula, --formulae Search online and locally for formulae.
--cask, --casks Search online and locally for casks.
--desc Search for formulae with a description
matching text and casks with a name or
description matching text.
--eval-all Evaluate all available formulae and casks,
whether installed or not, to search their
descriptions. Implied if HOMEBREW_EVAL_ALL is
set.
--pull-request Search for GitHub pull requests containing
text.
--open Search for only open GitHub pull requests.
--closed Search for only closed GitHub pull requests.
--repology Search for text in the given database.
--macports Search for text in the given database.
--fink Search for text in the given database.
--opensuse Search for text in the given database.
--fedora Search for text in the given database.
--archlinux Search for text in the given database.
--debian Search for text in the given database.
--ubuntu Search for text in the given database.
-d, --debug Display any debugging information.
-q, --quiet Make some output more quiet.
-v, --verbose Make some output more verbose.
-h, --help Show this message.
Error: Invalid usage: This command requires at least 1 text or regex argument.
Installing requirements for osx_brew.
Updating system..........
Installing required packages: gcc#6........There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://docs.brew.sh/Installation
.
Error running 'requirements_osx_brew_libs_install gcc#6',
please read /Users/benoitlardinois/.rvm/log/1673081014_ruby-3.0.0/package_install_gcc#6.log
Requirements installation failed with status: 1.
So, if I run brew install gcc#6, I receive:
Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
Warning: gcc#6 has been deprecated because it is deprecated upstream!
==> Fetching dependencies for gcc#6: isl, mpfr and libmpc
==> Fetching isl
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed
Already downloaded: /Users/benoitlardinois/Library/Caches/Homebrew/downloads/195208ba31cadc265ea97bb8aad4e78caab1200daf4d855e6c839b5f987f92db--configure-big_sur.diff
==> Downloading https://libisl.sourceforge.io/isl-0.25.tar.xz
Already downloaded: /Users/benoitlardinois/Library/Caches/Homebrew/downloads/dce6d1ed4d25c923a4ad350c4b9cdf03406f649cd55be8c385814703502b5c81--isl-0.25.tar.xz
==> Fetching mpfr
==> Downloading https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz
Already downloaded: /Users/benoitlardinois/Library/Caches/Homebrew/downloads/2b7a1efec00f58b200d550146d18563516f005674020aa39ca2cd6666cb1d215--mpfr-4.2.0.tar.xz
==> Fetching libmpc
==> Downloading https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz
Already downloaded: /Users/benoitlardinois/Library/Caches/Homebrew/downloads/22a255b07a458ea7bd9717c0d1509282a69135dd842aa6b64144820c50bfd208--mpc-1.3.1.tar.gz
==> Fetching gcc#6
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-6.5.0/gcc-6.5.0.tar.xz
Already downloaded: /Users/benoitlardinois/Library/Caches/Homebrew/downloads/0a7c1b4768113746153c6e06f4ea6b2abf2d8ba48a68bf28f7c686b70117540e--gcc-6.5.0.tar.xz
==> Installing dependencies for gcc#6: isl, mpfr and libmpc
==> Installing gcc#6 dependency: isl
==> Patching
==> Applying configure-big_sur.diff
patching file configure
Hunk #1 succeeded at 13866 (offset 5133 lines).
==> ./configure --prefix=/usr/local/Cellar/isl/0.25 --with-gmp=system --with-gmp-prefix=/usr/local/op
==> make
Last 15 lines from /Users/benoitlardinois/Library/Logs/Homebrew/isl/02.make:
constexpr value_type& value() &
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:933:33: note: candidate function has been explicitly made unavailable
constexpr value_type const& value() const&
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:951:28: note: candidate function not viable: no known conversion from 'optional<...>' to 'optional<...>' for object argument
constexpr value_type&& value() &&
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/optional:960:34: note: candidate function not viable: no known conversion from 'optional<...>' to 'const optional<...>' for object argument
constexpr value_type const&& value() const&&
^
2 errors generated.
make[2]: *** [isl_test_cpp17.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
Error: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
I'm in despair, I don't know what I'm supposed to do.
The warning is clearly stating that macOS 10.13 is too old, so the best thing is to upgrade the OS - there were several failed attempts to build Ruby 3.0 - see https://github.com/rvm/rvm/issues/5055
Also, GCC below version 10 are deprecated - see homebrew issue https://github.com/Homebrew/homebrew-core/pull/110163
Though, you can first try switching from rvm to rbenv - seems like someone get it done with rbenv on High Sierra - https://github.com/rvm/rvm/issues/5012#issuecomment-811858777

how to upgrade dart to higher version 2.14+

I have already installed dart in mac(Intel Chip):
$ brew info dart ‹ruby-2.7.2›
dart-lang/dart/dart: stable 2.14.4, HEAD
SDK
https://dart.dev
Conflicts with:
dart-beta (because dart-beta ships the same binaries)
/usr/local/Cellar/dart/HEAD (868 files, 506.2MB) *
Built from source on 2022-09-04 at 22:53:21
/usr/local/Cellar/dart/2.14.4 (822 files, 543.3MB)
Built from source on 2022-08-20 at 18:17:47
/usr/local/Cellar/dart/2.18 (918 files, 677.8MB)
Built from source
From: https://github.com/dart-lang/homebrew-dart/blob/HEAD/Formula/dart.rb
==> Options
--HEAD
Install HEAD version
==> Caveats
Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec
(base)
now I want to upgrade the dart version to 2.18, but I did not found the new version of formula:
$ brew install dart#2.18 ‹ruby-2.7.2›
Warning: No available formula with the name "dart#2.18". Did you mean dart#2.1, dart#2.8, dart#2.13, dart#2.12, dart#2.10, dart#2.2, dart#2.7, dart#2.6, dart#2.5, dart#2.4, dart#2.3, dart#2.9 or dart#2.0?
==> Searching for similarly named formulae...
These similarly named formulae were found:
dart-lang/dart/dart#2.1 dart-lang/dart/dart#2.12 dart-lang/dart/dart#2.7 dart-lang/dart/dart#2.4 dart-lang/dart/dart#2.0
dart-lang/dart/dart#2.8 dart-lang/dart/dart#2.10 dart-lang/dart/dart#2.6 dart-lang/dart/dart#2.3
dart-lang/dart/dart#2.13 dart-lang/dart/dart#2.2 dart-lang/dart/dart#2.5 dart-lang/dart/dart#2.9
To install one of them, run (for example):
brew install dart-lang/dart/dart#2.1
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
(base)
is it possible to install higher version of dart in macos, I have tried to searching from google but still found no one talk about this issue. what should I do to upgrade the dart? I have already tried the brew upgrade command.
You can try dart-sdk 2.18.5, which is pretty well maintained.
We dont have dart in homebrew-core due to the reason detailed in here.

Pip suddenly cant find or install any package

Suddenly pip cant install or find any package, it cant even figure out its own version.
I reinstalled python multiple times, i have the latest version of python 3 and pip. I also tried to clear pip cache. Nothing works, this is really annoying...
Errors:
>pip install redblacktree
ERROR: Could not find a version that satisfies the requirement redblacktree (from versions: none)
ERROR: No matching distribution found for redblacktree
WARNING: There was an error checking the latest version of pip
>pip config list
freeze.user='yes'
global.index-url='http://pypi.org/simple'
global.trusted-host='pypi.org'
install.user='yes'
list.user='yes'
uninstall.user='yes'
I fixed it by locating the pip.ini config file and removing the line index-url = http://pypi.org/simple

error installing ruby old version 2.0.0-p247

I am trying to run command
rbenv install 2.0.0-p247
I tried to follow several steps by googling the errors that I faced but I am still not able to resolve the error
I got this error
BUILD FAILED (macOS 11.4 using ruby-build 20210804)
Inspect or clean up the working tree at /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.F4rCnt
Results logged to /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.log
Last 10 log lines:
compiling ancdata.c
compiling raddrinfo.c
installing default socket libraries
compiling constants.c
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
make: *** [build-ext] Error 2
The log file mentioned above has content:
https://easyupload.io/gygw5y
Ruby 2.0.0 is very much past its end of life, so I'm assuming you have a specific reason you need install it. Otherwise, you are much better off installing a modern, supported version such as 2.7.x or 3.0.x.
Older versions of ruby were built with openssl#1.0. After 1.0 went end of life, ruby-build had a breaking change to require openssl#1.1. This means that ruby versions < 2.4 can no longer be installed/built directly using ruby-build (i.e., rbenv). This GitHub issue has details.
Homebrew has removed its openssl#1.0 formula, but you can still install it via an rbenv tap. The following might work for you, though the comments in the issue report mixed results depending on the version of Command Line Tools being used.
brew install rbenv/tap/openssl#1.0
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.0)" 2.0.0-p247
Note: if you are running on an M1 (Apple Silicon) Mac, you might be out of luck. AFIK, there's no intention of getting openssl#1.0 to to work on Apple Silicon.

Installing Haskell packages on Mac

I can't seem to get a few Haskell packages to install on my Mac (10.6.8). I first tried Happstack and it failed and then I tried Snap.
Sometimes when I run ghci I get a segmentation fault.
Other times it works and goes like this:
GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude>
When trying to get Snap:
....
....
....
Loading package vector-0.10.0.1 ... linking ... done.
Loading package zlib-0.5.4.0 ... linking ... done.
Loading package zlib-bindings-0.1.1.3 ... linking ... done.
Loading package zlib-enum-0.2.3 ... linking ... done.
Loading package snap-core-0.9.3.1 ... linking ... done.
Loading package snap-server-0.9.3.3 ... linking ... done.
Loading package directory-tree-0.11.0 ... linking ... done.
cabal: Error: some packages failed to install:
snap-0.11.2 failed during the building phase. The exception was:
ExitFailure 11
I have seen this problem a few times but nothing really solved it for me. Any ideas?
Updated May 22, 2021
Have you tried using homebrew? It handles the dependencies for you.
Using homebrew, you can use the brew command to install ghc and cabal-install.
$ brew install ghc cabal-install
==> Downloading https://ghcr.io/v2/homebrew/core/ghc/manifests/8.10.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ghc/blobs/sha256:965f94c14b56e3db7b239860e0a1d577be0b27caf8adb6212710a7430ce723d3
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:965f94c14b56e3db7b239860e0a1d577be0b27caf8adb6212710a7430ce723d3?se=2021-05-23T05%3A15%3A00Z&sig=fkH7sUY44VCLV8hI%2BtZT%2B
######################################################################## 100.0%
==> Pouring ghc--8.10.4.big_sur.bottle.tar.gz
==> /usr/local/Cellar/ghc/8.10.4/bin/ghc-pkg recache
🍺 /usr/local/Cellar/ghc/8.10.4: 6,907 files, 1.5GB
==> Downloading https://ghcr.io/v2/homebrew/core/cabal-install/manifests/3.4.0.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/cabal-install/blobs/sha256:2c0c5cc90d4739515721557f8e9c02783b3b5f106033c5c09241657b4418b21f
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:2c0c5cc90d4739515721557f8e9c02783b3b5f106033c5c09241657b4418b21f?se=2021-05-23T05%3A15%3A00Z&sig=O7ylxHgq42YVADlzTacdRfY7W
######################################################################## 100.0%
==> Pouring cabal-install--3.4.0.0.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/cabal-install/3.4.0.0: 7 files, 39.6MB
Once installed, you should be able to run:
$ ghc
ghc: no input files
Usage: For basic information, try the `--help' option.
As well as the Haskell interpreter, ghci:
$ ghci
GHCi, version 8.10.4: https://www.haskell.org/ghc/ :? for help
Prelude>
Hope this helps!
brew install haskell-platform is no longer supported. You may want to
Error: No available formula for haskell-platform
We no longer package haskell-platform. Consider installing ghc and cabal-install instead:
brew install ghc cabal-install
Since haskell-platform on homebrew for Mac is deprecated, you can use brew install ghc cabal-install instead. I did it on Yosemite and it took about one minute…
> $ brew install ghc cabal-install
==> Downloading https://homebrew.bintray.com/bottles/ghc-7.10.1_1.yosemite.bottl
######################################################################## 100.0%
==> Pouring ghc-7.10.1_1.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/ghc/7.10.1_1: 5423 files, 821M
==> Downloading https://homebrew.bintray.com/bottles/cabal-install-1.22.2.0.yose
######################################################################## 100.0%
==> Pouring cabal-install-1.22.2.0.yosemite.bottle.1.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/cabal-install/1.22.2.0: 6 files, 19M
This is an old question but given it comes quiet high on Google search. This is how I got here.
$ brew update
$ brew install haskell-stack
$ stack --version
$ stack --help # "man stack" gives something completely different
$ stack setup # Install GHC
$ stack ghci
Source: http://seanhess.github.io/2015/08/04/practical-haskell-getting-started.html
Why stack and not cabal?
Edit:
I found annoying to have to write "stack ghci" each time I wanted to use "ghci". A solution to this was to simply add these lines to the ~/.bash_aliases file:
alias sghc='stack ghc'
alias sghci='stack ghci'
alias srunhaskell='stack runhaskell'
Then source the file to apply:
$ source ~/.bash_aliases
Then I can run ghci and / or haskell running these commands, and it will use the stack version:
$ sghc [filename]
$ sghci
$ srunhaskell
Update: February 2016: Whilst other answers were helpful, I didn't find a complete, up-to-date answer.
The install is easy:
$ brew install ghc cabal-install
An extra step I needed to perform post-install was:
$ cabal update
followed by:
$ cabal install ghc-mod
See here for details.
Alternatively, instead of using homebrew for the install, visit Haskell Platform for the installer disk image - note that Haskell Platform is only compatible with OS X 10.6 and later.
Although, as a general rule I always use homebrew to manage my dependencies, when it comes to Haskell my recommendation (unless you really know what you are doing) is to just install this binary. This avoids any surprises further down the road. There is excellent documentation post install locally at: file:///Library/Haskell/doc/start.html
The popular answer to this question (using brew to install haskell-platform) is no longer supported.
Unfortunately, GHC 7.4 isn't supported on OS X 10.6; the download page only has an installer for 10.7, and as you can see, they mean it. I know your problem from bitter experience—I was in exactly your boat for a good long while, and I never found a solution other than upgrading Mac OS X (or, presumably, downgrading GHC, but I didn't really want to do that). A colleague of mine did manage to get 7.4.1 running on OS X 10.5, but it took nontrivial effort on her part (she had to use a different version of GMP, namely 5.0.5, and edit GHC's configure script), and I never tried to replicate it myself.
In the end, you have four options, in roughly decreasing order of simplicity:
Use an older Haskell Platform. This means downgrading to GHC 7.0.x (not GHC 7.2.x—that was never in the Platform); there's not a good record of which GHC versions were in which package versions, though. Wikipedia implies that 2011.2 was the first version with GHC 7.0.x and that 2012.2 was the first version with GHC 7.4.x, so I'd try 2011.4.0.0 first.
Install GHC 7.2 (which is supported on OS X) on its own, and forgo the Haskell Platform. This can cause headaches, but is possible. Don't forget to install Cabal, cabal-install, all the packages that come with the platform, etc.
Upgrade to OS X 10.7 or 10.8, if you feel like a more global (and pricier) change.
Try to replicate what my colleague did. (Best of luck, but it's definitely possible.)
Late 2017 answer. I'm running macOS Sierra -- 10.12.6 (16G29). This worked successfully with an install time on my MacBook Air of under five minutes:
brew cask install haskell-platform
Then ghc --version reported:
The Glorious Glasgow Haskell Compilation System, version 8.2.1

Resources