-1

Not too familiar with homebrew. I'm trying to downgrade jq from 1.6 to 1.3.1 by running

brew install jq@1.3.1

but I keep receiving

Warning: No available formula with the name "jq@1.3.1".
==> 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.

as my error response.

I've tried brew install jq@1.3, brew install jq=1.3, brew install jq==1.3 to no avail. Any advice?

oguz ismail
  • 39,105
  • 12
  • 41
  • 62
  • Does this answer your question? [homebrew - how to install older versions](https://stackoverflow.com/questions/39187812/homebrew-how-to-install-older-versions) – matt May 03 '22 at 22:08

1 Answers1

0

jq 1.3 is available via homebrew, but AFAICT, a version specifically tagged 1.3.1 is not. (See e.g. https://stedolan.github.io/jq/download )

One way to fetch a specific version is as follows:

  1. First you'll probably want to uninstall jq:
brew uninstall jq
  1. Find a suitable jq.rb e.g. by browsing https://github.com/Homebrew/homebrew-core/commits/master/Formula/jq.rb

For jq 1.3 the following would suffice:

URL=https://github.com/Homebrew/homebrew-core/blob/9517da4a73f8eb9af8c8c217a52526f5edf428a2/Formula/jq.rb
  1. Fetch and execute the script
wget $URL  # or use curl

brew install -s jq.rb
peak
  • 88,177
  • 15
  • 123
  • 150
  • Thanks for the comment, after following your instructions, I've received this error prompt ```Error: Non-checksummed download of jq formula file from an arbitrary URL is unsupported! `brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap on GitHub instead.``` – Nicholas Rinaldi May 04 '22 at 14:35
  • Updated to fetch then execute. – peak May 04 '22 at 16:18