brew cannot install go#1.13 while brew search shows it - homebrew

I am seeing on my mac the the following weird situation
$ brew search go#1.13
==> Formulae
go#1.13
and
$ brew install go#1.13
Error: go#1.13: unknown keyword: because
Also the error message is weird (it doesn't seem to complete the sentence.) I can brew install go#1.14 without any problem.
Please help provide some clues. Thank you.

That looks like your brew is not up to date. Can you run brew update to ensure everything is up to date before running brew install go#1.13? That would probably solve your issue.
Here is my installation test:
$ brew install go#1.13
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 15 formulae.
Warning: go#1.13 has been deprecated because it is not supported upstream!
==> Downloading https://homebrew.bintray.com/bottles/go%401.13-1.13.15.mojave.bottle.1.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/d994ff2b27c191bb74dd44a373e254ef92472c1cb13e381cf6bf9d3d118
######################################################################## 100.0%
==> Pouring go#1.13-1.13.15.mojave.bottle.1.tar.gz
==> Caveats
go#1.13 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have go#1.13 first in your PATH run:
echo 'export PATH="/usr/local/opt/go#1.13/bin:$PATH"' >> /Users/rchen/.bash_profile
==> Summary
🍺 /usr/local/Cellar/go#1.13/1.13.15: 9,282 files, 414.5MB

Related

Can't install nano via homebrew on m1 Mac

My main goal was to have syntax highlighting for nano.
Apparently my nano seems to be pico 5.09 instead of nano.
Running which nano, returns:
/usr/bin/nano
Then I tried to install the real nano with brew, there I get this error:
Warning: Treating nano as a formula. For the cask, use homebrew/cask/nano
Error: nano dependencies not built for the arm64 CPU architecture:
gettext was built for x86_64
I think brew looks like the legit arm version.
which brew
/opt/homebrew/bin/brew
What could I do to have the end result of
Nano with syntax highlighting?
If your brew dependencies are out of date, this could happen.
% brew update && brew upgrade && brew install nano
Already up-to-date.
...
% brew install nano
Warning: Treating nano as a formula. For the cask, use homebrew/cask/nano
==> Downloading https://ghcr.io/v2/homebrew/core/nano/manifests/6.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nano/blobs/sha256:7206f1c20ac7f
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring nano--6.4.arm64_monterey.bottle.tar.gz
==> nano cask is installed, skipping link.
🍺 /opt/homebrew/Cellar/nano/6.4: 103 files, 3.2MB
==> Running `brew cleanup nano`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Problem when installing openconnect using brew

I am stuck when trying to install "openconnect" using homebrew because I am not permitted to make the symbolic link to /usr/local/share/locale/ca/LC_MESSAGES.
I am running Big Sur version 11.4.
Below follows what I have tried:
(base) MacBook-Pro-5:Data Eigil$ brew uninstall --force openconnect
Uninstalling openconnect... (54 files, 2.8MB)
(base) MacBook-Pro-5:Data Eigil$ brew cleanup -s openconnect
Removing: /Users/Eigil/Library/Caches/Homebrew/openconnect--8.10... (971.3KB)
(base) MacBook-Pro-5:Data Eigil$ brew cleanup --prune-prefix
(base) MacBook-Pro-5:Data Eigil$ brew install openconnect
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 8 formulae.
==> Updated Casks
Updated 1 cask.
==> Downloading https://ghcr.io/v2/homebrew/core/openconnect/manifests/8.10
Already downloaded: /Users/Eigil/Library/Caches/Homebrew/downloads/c979ec1baea5847f748962ba42b95bce88cef90599731a131c5588090c9c066b--openconnect-8.10.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/openconnect/blobs/sha256:9755c4ea66ed9c8aa1f1ee966c932ec2be37849887636d8f65a920f20c16ec55
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:9755c4ea66ed9c8aa1f1ee966c932ec2be37849887636d8f65a920f20c16ec55?
######################################################################## 100.0%
==> Pouring openconnect--8.10.big_sur.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/locale/ca/LC_MESSAGES/openconnect.mo
/usr/local/share/locale/ca/LC_MESSAGES is not writable.
You can try again using:
brew link openconnect
==> Summary
🍺 /usr/local/Cellar/openconnect/8.10: 54 files, 2.8MB
The suggested solution doesn't work (still because I cannot write to LC_MESSAGES). sudo is not permitted on that directory neither.
ls -l /usr/local/share/locale/ca/
gives:
total 0
drwxr-xr-x 3 root wheel 96 Jun 28 11:34 LC_MESSAGES/
Any help would be appreciated.
Homebrew is not designed to work with sudo. You should never prepend sudo before command brew, which will change the ownership of some of the brew related files.
The consequence is that some of the files are not owned by you but by root now. You have to fix the permission.
# For x86 Mac
sudo chown -R "$(whoami):admin" /usr/local/*
# For M1 mac
sudo chown -R "$(whoami):admin" /opt/homebrew/*
# NOTE:
# * in /usr/local/* is used on purpose to only match the sub folders, files
# The command will take some time, wait patiently.
You'd better re-install openconnect after above fix.

Refusing to link macOS-provided software: libiconv

In an effort to follow the steps posted here to get nokogiri working, I seem unable to link iconv properly.
When I run the command
brew link libiconv
I receive the following error:
Warning: Refusing to link macOS-provided software: libiconv
If you need to have libiconv first in your PATH run:
echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.bash_profile
For compilers to find libiconv you may need to set:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
export CPPFLAGS="-I/usr/local/opt/libiconv/include"
I've added the above paths to my bash profile, reloaded the terminal, restarted the terminal and even tried restarting the computer as well but the error still persists. I've also tried reinstalling libiconv but to no avail (see output below).
$ brew reinstall libiconv
==> Reinstalling libiconv
==> Downloading https://homebrew.bintray.com/bottles/libiconv-1.16.mojave.bottle.tar.gz
Already downloaded: /Users/sam/Library/Caches/Homebrew/downloads/203933f4d9f3c2f0463012d85013a6c01bdb89fc4d435341315b4537de1dba78--libiconv-1.16.mojave.bottle.tar.gz
==> Pouring libiconv-1.16.mojave.bottle.tar.gz
==> Caveats
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have libiconv first in your PATH run:
echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.bash_profile
For compilers to find libiconv you may need to set:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
export CPPFLAGS="-I/usr/local/opt/libiconv/include"
==> Summary
🍺 /usr/local/Cellar/libiconv/1.16: 30 files, 2.4MB
libiconv is keg-only.
❯ brew info libiconv
libiconv: stable 1.16 (bottled) [keg-only]
Conversion library
https://www.gnu.org/software/libiconv/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libiconv.rb
==> Caveats
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
In the post link given by you, linking libiconv is unneeded. Cause only the real installation location is used but not the linked one. Just skip this link step and run following command,
# use the real installation location is not preferred, cause it will
# break you once the libiconv is upgraded to a new version
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.16
# you'd better pass the dir "/usr/local/opt/libiconv",
# which serves as a link to the real installation location.
gem install nokogiri -- --with-iconv-dir=/usr/local/opt/libiconv

MAC : No available formula with the name "brew-cask"

Trying to install brew-cask after tapping caskroom/cask,
brew tap caskroom/cask
brew install brew-cask
But getting error,
$ brew install brew-cask
Updating Homebrew...
Error: No available formula with the name "brew-cask"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
This similarly named formula was found:
brew-cask-completion ✔
To install it, run:
brew install brew-cask-completion ✔
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
Tried brew cleanup, untapped caskroom/cask and reinstallation of brew-cask but no luck.
I installed, brew-cask-completion using brew install brew-cask-completion. And read somewhere brew-cask is deprecated. So what is the solution. I ignored it and installed the java open sdk. My question is, is it going to be a problem in future if I don't install it?
Thanks in advance!
It happens because of corrupted core installation, actually you will give this error for installing any packages, you should fix the with:
rm -fr $(brew --repo homebrew/core)
Then install what ever you want, for me:
brew intall deno
Try reinstalling it with these commands in this order:
brew uninstall brew-cask
brew untap caskroom/cask
brew tap caskroom/cask
brew install brew-cask

How can I force homebrew to recompile?

I'm trying to install wxWidgets on Mac OS X 10.9. It's already installed, but I'm having the problem described here. Someone suggested to add ENV.append_to_cflags "-stdlib=libc++". I did, but I'm not able to recompile the code.
$ brew install wxmac
Warning: wxmac-3.0.0 already installed
$ brew edit wxmac
=> ok, modifications done, now I want to recompile and reinstall
$ brew uninstall wxmac
Uninstalling /usr/local/Cellar/wxmac/3.0.0...
$ brew install wxmac
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/wxmac- 3.0.0.mavericks.bottle.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/wxmac-3.0.0.mavericks.bottle.2.tar.gz
==> Pouring wxmac-3.0.0.mavericks.bottle.2.tar.gz
🍺 /usr/local/Cellar/wxmac/3.0.0: 775 files, 41M
How can I force homebrew to recompile?
Homebrew is installing wxmac in bottle form (a pre-compiled binary of wxmac). To build from source, add the --build-from-source flag when calling brew install:
$ brew install --build-from-source wxmac
To rebuild all installed FORMULAE from source:
$ brew list | xargs brew reinstall --build-from-source

Resources