Downgrade FreetTDS on Mac to Access Sybase Anywhere 10 using Homebrew

There’s a bug in FreeTDS 4.2 that prevents macs from connecting to older Sybase Anywhere databases.

Brew doesn’t naturally have a downgrade version but here’s a way around it

Following the directions here: https://docs.brew.sh/FAQ#can-i-edit-formulae-myself

  1. edit the ~/.zshrc shell file. (Assuming you’re using zsh as your shell)
  2. add a line

HOMEBREW_NO_INSTALL_FROM_API=1

3. Tap the homebrew core (use force because it’s unneeded for most activities)

brew tap homebrew/core -f

4. Edit the FreeTDS script

brew edit freetds

5. replace it all with the 1.3.x version based on the homebrew forumla commit history and github.
https://github.com/Homebrew/homebrew-core/blob/c20f8bf4168b2ebf3399ef6ef53f3c4b942d61bb/Formula/f/freetds.rb

6. Save the file

7. install the new script

brew install freetds