How do I install ansible-galaxy on mac os using brew? - ansible

Is it possible to install ansible galaxy using brew on mac os? I tried:
$ brew install ansible-galaxy
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> Updated Formulae
git-lfs ✔ cpprestsdk exercism gobject-introspection kube-aws minio-mc remarshal teleport vegeta
ammonite-repl ddgr fluent-bit grpc libimagequant nailgun root terraform_landscape xsimd
angular-cli dscanner fmt instead librealsense node-build serverless tinyxml2 you-get
arx duo_unix fruit ios-deploy libsass opencv#2 sfcgal tty-solitaire
conan elektra git-quick-stats jdupes libvirt osrm-backend snappystream urdfdom_headers
console_bridge ethereum gitbucket kallisto minio parallelstl sysdig vagrant-completion
Error: No available formula with the name "ansible-galaxy"
==> 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.
but it didn't work.
Thanks for reading my post.

Once you install ansible on your machine using brew or pip you will get ansible-galaxy automatically it's not a package it's a subcommand of the ansible like ansible-vault ansible-doc etc.

Related

Warning: No available formula with the name "mkcert"

Im using a M1 mac and Im trying to install mkcert using brew,
The command that I use is:
brew install mkcert
This is the error that I get:
brew install mkcert
fatal: Could not resolve HEAD to a revision
Warning: No available formula with the name "mkcert".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> 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.
What am I doing wrong?
What I ended up doing is resolving this part:
fatal: Could not resolve HEAD to a revision
by following the most voted comment on this thread:
https://github.com/Homebrew/discussions/discussions/1512
this is the solution the suggested:
rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core

Unable to install wget

My MacBook Air was equipped with macOS Mojave Version 10.14.6.
I cannot install wget even if I have checked brew version.
brew --version
The output is :
Homebrew 3.3.13
Homebrew/homebrew-core (no Git repository)
Homebrew/homebrew-cask (git revision fb6ec06d8b; last commit 2022-01-31)
When I tried to install wget:
brew install wget
This is the result:
Warning: No available formula with the name "ca-certificates".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Running `brew update --preinstall`...
Error: No formulae found in taps.
fatal: Could not resolve HEAD to a revision
Warning: No available formula with the name "wget".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> 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.
This problem has bothered me for a long while...
Eventually, I solved this problem by running the following code:
brew update-reset
brew install wget
I hoped this may help others.
Problem could be 'Homebrew/homebrew-core not tapped properly'. Executing these two commands resolved the issue for me.
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core

Why can't I install openssl on my Mac by homebrew?

I run the following code, which show that there are no openssl repo find in brew.
My Mac is macOS Big Sur 11.3.1
% brew install openssl
Updating Homebrew...
fatal: Could not resolve HEAD to a revision
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.
Warning: No available formula or cask with the name "openssl".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
This formula was found in a tap:
homebrew/portable-ruby/portable-openssl
To install it, run:
brew install homebrew/portable-ruby/portable-openssl
UPDATE
Seems that my brew can't install ccache either like the following. It is more of a brew issue?
brew install ccache
try this put it in terminal and run:
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
The following commands help
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
try this:
git -C $(brew --repo homebrew/core) checkout master
^This should be the fix anytime you see the error "Could not resolve HEAD to a revision, as you may find at the bottom of the output when running "brew doctor"

brew install Freezing

I'm having trouble with brew install <PackageName>
I had macOS BigSur and could use commands like brew easily but in recent downgrade (Mojave) I can't do it anymore
it freeze about 60 second and reply with (If I getting it right) that can't update the main repository
CODE :
Updating Homebrew...
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Could not resolve HEAD to a revision
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> New Casks
8x8-work disk-expert guilded odbc-manager ubports-installer
diagnostics duplicate-file-finder hush pktriot
==> Updated Casks
Updated 352 casks.
==> Deleted Casks
adafruit-arduino beautune caramba-switcher
adobe-lens-profile-creator blue-jeans-browser-plugin
Warning: No available formula or cask with the name "htop".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> 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.
Homebrew is managed by git repos. From the output, homebrew is detached and homebrew-core repo is missing.
Let's try following commands to fix the repos.
# Reset remote repo for Homebrew, the pkg manager itself
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
# Reset origin for homebrew taps
BREW_TAPS="$(brew tap)"
for tap in core cask{,-fonts,-drivers,-versions}; do
if echo "$BREW_TAPS" | grep -qE "^homebrew/${tap}\$"; then
git -C "$(brew --repo homebrew/${tap})" remote set-url origin https://github.com/Homebrew/homebrew-${tap}.git
fi
done
brew update-reset
If it doesn't work, you may have to reinstall Homebrew.

how to install gcc 4.4 on mac

I tried using brew to install gcc 4.4 on mac using brew install gcc44 but i got this error
Error: No available formula with the name "gcc44"
==> Searching for a previously deleted formula...
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...

Resources