Install azure cli via brew not working in mac m1 - macos

I have be trying to install azure cli in new mac m1. But it fails. I get the following error
brew reinstall azure-cli
==> Downloading https://ghcr.io/v2/homebrew/core/azure-cli/manifests/2.22.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/azure-cli/blobs/sha256:1980c967
==> Downloading from https://pkg-containers-az.githubusercontent.com/ghcr1/blobs
######################################################################## 100.0%
==> Reinstalling azure-cli
==> Pouring azure-cli--2.22.1.arm64_big_sur.bottle.tar.gz
🍺 /opt/homebrew/Cellar/azure-cli/2.22.1: 19,449 files, 329.3MB
After Pouring it just stops. I also tried to install using pip3 and I can install that successfully but when I type "az" command I get the following error
/opt/homebrew/bin/az: line 2: 64784 Killed: 9 AZ_INSTALLER=HOMEBREW /opt/homebrew/Cellar/azure-cli/2.22.1/libexec/bin/python -m azure.cli "$#"

As mentioned in the comments: My python3 wasn't installed via brew. So first uninstalled brew and python3. Then installed brew again(before that made sure Rosetta 2 is working). Then tried brew doctor. There was error saying /usr/... then, I deleted those files. Once successfully removed/deleted brew doctor will run fine.

Related

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

SSL Error installing rbenv on Mac Catalina

I'm trying to install rbenv on Mac Catalina Version 10.15.7 using homebrew and I get this error:
gaston.ramos#AR-IT10128 ~ % brew install rbenv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 4 formulae.
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.catalina.bottle.4.tar.gz
Already downloaded: /Users/gaston.ramos/Library/Caches/Homebrew/downloads/c473cc5dd3e84f64b99973078d9d9caae87e7810e6e771008e63d651bbe8007f--autoconf-2.69.catalina.bottle.4.tar.gz
==> Downloading https://github.com/rbenv/ruby-build/archive/v20201221.tar.gz
##O#- #
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "ruby-build"
Download failed: https://github.com/rbenv/ruby-build/archive/v20201221.tar.gz
Any idea on how to solve this? It seems that there is an SSL error when brew tries to download ruby-build
Thanks.
Use a different mirror
foo#bar$ env HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles brew install rbenv

brew cannot find ANY packages

I just got my Mac Pro from the shop after hard drive failure. I am trying to install my environment again.
I installed homebrew from the current link on the homebrew website:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
but I cannot install ANY package. Brew cannot find ANYTHING.
~ brew install rbenv
Error: No available formula with the name "rbenv"
==> Searching for a previously deleted formula (in the last month)...
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.
What is wrong?
I had the same issue and I was able to solve it by running the doctor command and follow the steps which need to be updated there.
My homebrew-core was not at the master branch.
brew doctor
git -C $(brew --repo homebrew/core) checkout master
And that's it. After that, I was able to run the rbenv install command.
brew search result
$ brew search rbenv
==> Formulae
rbenv rbenv-bundle-exec rbenv-chefdk rbenv-default-gems rbenv-vars
rbenv-aliases rbenv-bundler rbenv-communal-gems rbenv-gemset rbenv-whatis
rbenv-binstubs rbenv-bundler-ruby-version rbenv-ctags rbenv-use
install rbenv
$ brew install rbenv
==> Downloading https://github.com/rbenv/ruby-build/archive/v20200819.tar.gz
==> Downloading from https://codeload.github.com/rbenv/ruby-build/tar.gz/v20200819
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/rbenv-1.1.2.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Installing dependencies for rbenv: ruby-build
==> Installing rbenv dependency: ruby-build
==> ./install.sh
==> Caveats
ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
to your /Users/rchen/.bash_profile:
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
OpenSSL <1.1.
==> Summary
🍺 /usr/local/Cellar/ruby-build/20200819: 509 files, 253.6KB, built in 5 seconds
==> Installing rbenv
==> Pouring rbenv-1.1.2.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/rbenv/1.1.2: 36 files, 65KB
==> Caveats
==> ruby-build
ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
to your /Users/rchen/.bash_profile:
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
OpenSSL <1.1.
version test
$ rbenv --version
rbenv 1.1.2

I cannot get solidity installed with homebrew on macOS Sierra. Installation hangs at boost

I have tried to install solidity on my Mac with
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity
as suggested at solidity#binary-packages. But when I try to brew install solidity the installation process gets stuck right here when installing boost:
bash-3.2$ brew install solidity
==> Installing solidity from ethereum/ethereum
==> Installing dependencies for ethereum/ethereum/solidity: boost, cryptopp, gmp
==> Installing ethereum/ethereum/solidity dependency: boost
==> Using the sandbox
==> Downloading https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.bz2
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost-1.64.0.tar.bz2
==> Downloading https://github.com/boostorg/mpi/commit/f5bdcc1.patch
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-c7af75a83fef90fdb9858bc988d64ca569ae8d940396b9bc60a57d63fca2587b.patch
==> Downloading https://github.com/boostorg/serialization/commit/1d86261.diff
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-155f603a00975a1702808be072c1420964feac8323de39c111a9d3a363a4ed9a.diff
==> Patching
==> Applying f5bdcc1.patch
patching file boost/mpi/detail/mpi_datatype_primitive.hpp
patching file boost/mpi/detail/packed_iprimitive.hpp
patching file boost/mpi/detail/packed_oprimitive.hpp
Hunk #2 succeeded at 97 (offset -5 lines).
==> Applying 1d86261.diff
patching file boost/serialization/array.hpp
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib --without-icu --without-libraries=python,mp
==> ./b2 headers
==> ./b2 --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib -d2 -j4 --layout=tagged --user-config=user-config.jam
I did find this brew hanging thread and tried to fix everything brew doctor gave me and I have the latest command line tools installed. I could not get it to work yet. Any ideas?
JK! Wow. I guess one of the manny things I tried must have worked. Now it still takes a very very long time but eventually it came to:
🍺 /usr/local/Cellar/boost/1.64.0_1: 12,630 files, 404.4MB, built in 17 minutes 38 seconds
17minutes. Wow.

How to install Basex for command line on OS X using Homebrew?

I'm trying to install BaseX using Homebrew on OS X:
$ brew cask install basex
==> We need to make Caskroom for the first time at /opt/homebrew-cask/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
==> Downloading http://files.basex.org/releases/8.1.1/BaseX811.app.tar.bz2
######################################################################## 100.0%
==> Symlinking App 'BaseX.app' to '/Users/user/Applications/BaseX.app'
🍺 basex staged at '/opt/homebrew-cask/Caskroom/basex/8.1.1' (148 files, 153M)
$ basex
-bash: basex: command not found
What exactly needs to be done to run it from command line?
brew cask installs GUI applications into /Applications, not the command line tools. If you want to install the command line tools, run brew install basex (without cask).
Also compare the cask recipy installing the application
app 'BaseX.app'
with the brew recipy installing the command line tools and creating symlinks to the executables
libexec.install Dir["*"]
bin.install_symlink Dir["#{libexec}/bin/*"]
to get a feeling of the differences.

Resources