Warnings of brew cleanup - homebrew

I got the following warnings when I did brew cleanup. How can I fix them?
$ brew cleanup
Warning: Skipping ant: most recent version 1.9.7 not installed
Warning: Skipping atk: most recent version 2.20.0 not installed
...
(continued)

This seems like a nondeterministic bug when a formula is built from source using:
brew install {{formula}} --HEAD
Messages like this:
Warning: Skipping llvm: most recent version 3.8.1 not installed
Warning: Skipping tidy-html5: most recent version 5.2.0 not installed
brew doctor can't fix this because it looks like some version finder code is trying to load the version number for HEAD formulas and indicating confusion.
Submit a minimal bug to the brew issue tracker which reproduces it consistently (using a small, quick-building, stable package).

Usually, you only need to update to the latest version,
brew upgrade ant
and
brew upgrade atk
*In your example
If it doesn't work, check how to update the version to the relevant package

Related

Unable to Upgrade Dart SDK from 2.18.7 to 2.19.0 using Homebrew

I am trying to upgrade my Dart SDK from 2.18.7 to 2.19.0 using homebrew formula brew upgrade dart.
However, the command always returns the same result
Warning: dart-lang/dart/dart 2.18.7 already installed.
brew info dart command shows:
==> dart-lang/dart/dart: stable 2.18.7, HEAD
SDK
https://dart.dev
Conflicts with:
dart-beta (because dart-beta ships the same binaries)
/usr/local/Cellar/dart/2.18.7 (921 files, 497MB) *
Built from source on 2023-01-29 at 02:33:36
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
I also have tried:
brew uinstall dart<br>
brew install dart<br>
brew upgrade dart
brew upgrade dart --devel --force
resulting `Error: invalid option: --devel`
Please, kindly suggest me any other solutions that could help.
The issue occurred as the homebrew formula for dart 2.18.7 is missing in the homebrew core formula commit history:
https://github.com/Homebrew/homebrew-core/commits/master/Formula/dart-sdk.rb
However, my dart version upgraded to 2.18.7 from 2.18.6 by an unintentional brew upgrade command resulting the issue.

Issues with installing Ruby 2.0.0 on macOS Catalina

I'm running to issue installing Ruby 2.0.0 on a new macbook with macOS Catalina (version 10.15.7). At first I installed Ruby with rvm which did not work. I figured out that it was because Catalina's default terminal is ZSH instead of Bash (https://gorails.com/setup/osx/10.15-catalina). I was able to install Ruby 2.6.3 with the instructions but the issue is that the project I'm currently working on was written in Ruby 2.0.0. I tried installing this version with rbenv install 2.0.0-p0 but I ran to the following errors:
ruby-build: using libyaml from homebrew
Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/vydoan/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2
Installing ruby-2.0.0-p0...
WARNING: ruby-2.0.0-p0 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (Mac OS X 10.15.7 using ruby-build 20201005)
Inspect or clean up the working tree at /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.0q3Cat
Results logged to /var/folders/m4/3k5xfdwx7x7gqkzzlyrlc_gc0000gn/T/ruby-build.20201006082731.4615.log
Last 10 log lines:
compiling cont.c
compiling ./enc/ascii.c
thread.c:928:27: error: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
tp->tv_usec = ts.tv_nsec / 1000;
~ ~~~~~~~~~~~^~~~~~
compiling ./enc/us_ascii.c
1 error generated.
make: *** [thread.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
I've tried doing the follow:
1.
brew tap homebrew/dupes
which gives me this error log
Error: homebrew/dupes was deprecated. This tap is now empty and all its contents were either deleted or migrated.
brew install gcc
rbenv install 2.0.0-p0
which gives me the same errors as above.
I've asked my team and found that another person also have issue with installing ruby on their new mac machines. The older mac didn't not have this problem. Was anyone able to successfully install Ruby 2.0.0 on the newer mac?
Hello I had numerous issues trying to install ruby 2.2.7 the project I work on has quiet a deprecated version of ruby necessary stated above now I ran into numerous problems they use rvm I could not install 2.2.7 using rvm I have however succeeded using rbenv the thing that ruins your experience is mainly the command line tools provided by Apple since in newer version it does not support compiling older ruby versions.
I also run the same version of MacOS :
Your best bet (since I've tried several days in a row to get my setup working installing ruby being the biggest blocker).Go to apple's developer site and download an older version of command line tools here and browse for 11.4.1(Before running the next steps make sure to purge previous attempts and ruby version managers and symlinks so it won't interfere with you next install and make your life hard).
Before downloading and installing it check your gcc -v remember that and install the command line tools you've downloaded and check it again to see if things went according to plan you should get something like:
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I haven't tried other versions but this one works afterwards go to rbenv official website install the tools add the shell scripts to your local .zshrc file (if you don't have one just create it).Besides adding what the guide says it ommits an important step you also need to add this to your .zshrc:
export PATH="$HOME/.rbenv/bin:$PATH"
Then you should just close and open the terminal and install the ruby version you need :
# list latest stable versions:
$ rbenv install -l
# list all local versions:
$ rbenv install -L
# install a Ruby version:
$ rbenv install 2.0.0-p247
Consult the docs as of how to use them globally or locally also if use is not working end all terminal windows and the process restart and it should work just okay.
!Important mentions is to not change the command line tools when compiling different ruby related version may break the setup (ignore brew messages to update command line tools when running brew doctor)!

brew upgrade <package> does not update to the latest version

I've noticed this happening a few times but this most recent instance is with wp-cli Running brew upgrade wp-cli does not download the latest version.
$ brew upgrade wp-cli
Error: homebrew/php/wp-cli 0.20.1 already installed
$ brew info wp-cli
homebrew/php/wp-cli: stable 0.20.1, HEAD
A set of command-line tools for managing WordPress installations.
http://wp-cli.org/
/usr/local/Cellar/wp-cli/0.20.1 (2635 files, 15M) *
Built from source
From: https://github.com/Homebrew/homebrew-php/blob/master/Formula/wp-cli.rb
Note the version is 0.20.1. When I check the formula repo, I see,
head "https://github.com/wp-cli/wp-cli.git"
When I check that repo, I see that the version in the master branch is 0.24.0. brew info and wp --version both return 0.20.1. Why isnt Homebrew grabbing the latest version? How do I force it to get the latest?
You'll need to run brew update first to force brew to update its list of formulae.

brew upgrade Error: No such file or directory - /usr/local/Cellar/autocode

When trying to upgrade homebrew packages, it gives back an error as follows:
$ brew upgrade
Error: No such file or directory - /usr/local/Cellar/autocode
Trying to interact with the autocode package shows that there isn't such a package:
$ brew uninstall autocode
Error: No such keg: /usr/local/Cellar/autocode
How do I fix this?
autocode is the new name of the crystal formula. Instead of uninstalling and reinstalling the formula you can use brew migrate crystal which will move /usr/local/Cellar/crystal to /usr/local/Cellar/autocode and take care of everything for you.
Autocode is the current name of a formula that was previously called Crystal. The Homebrew formula was renamed October 2015. This error is likely showing up because crystal is installed.
It can be fixed with brew uninstall crystal. If Autocode is a dependency of something you use, the newer version can be installed with brew install autocode.

multiple side-by-side versions with Homebrew?

Is it possible to install multiple versions side-by-side with Homebrew?
I find myself in a situation needing sbt-0.7.x, sbt-0.10.x and sbt-0.11.0. I've installed both sbt-0.7.7 and sbt-0.10.1 manually at the moment to work around the issue (with sbt-0.11.0 being the latest 'sbt' from Homebrew).
Yeah. When you install a new version of a package, it keeps the old one. The symlinks in /usr/local/bin or wherever point to the latest version, but you can still call the binaries (or link to the libraries) in the older version.
brew list to see what's installed. You can look in package directories to see all the versions; or call brew list --versions to see all packages and all versions.
To easily switch between versions of formulae, you can use:
brew switch <formula> <version>
For example:
brew switch gradle 3.2.1
To list which versions you have installed try:
brew list --versions
or:
brew list <formula> --versions
If you want to get rid of older versions, just use:
brew cleanup
As of Homebrew 2.0.0, it would remove old packages automatically when brew upgrade is called. (https://brew.sh/2019/02/02/homebrew-2.0.0/). To opt-out of this behavior, set the environment variable: export HOMEBREW_NO_INSTALL_CLEANUP=1

Resources