Just ran into some trouble updating elixir with brew so I thought I’d provide a quick writeup since I didn’t see anything else while searching.
I was upgrading elixir with brew upgrade and received an error claiming that wxwidgets@3.2 could not be linked, which interrupted the upgrade. A brew doctor check indeed showed it was unlinked.
Some brief spelunking showed that the erlang package was switched from wxwidgets to wxwidgets@3.2 for whatever reason.
Unfortunately it appears that these packages conflict during linking, and brew is not smart enough to uninstall wxwidgets (which was at the time actually at 3.2) before installing wxwidgets@3.2.
I first tried upgrading wxwidgets, which inadvertently upgraded erlang and elixir (brew moment), and surprisingly that upgrade completed successfully, but wxwidgets@3.2 still wasn’t linked. This seemed like a bad state to be in (presumably they pinned the version for a reason).
I tried brew link wxwidgets@3.2 thinking maybe it wouldn’t conflict now that wxwidgets was at 3.3, but apparently the paths still conflicted. I then tried uninstalling wxwidgets, but brew claimed that it was still required by elixir (but not erlang?!), which was a lie (elixir only depends on erlang). I then tried forcibly uninstalling wxwidgets, which succeeded.
I was going to then attempt brew link again, but at this point I realized I was wasting my time and just uninstalled elixir (which cleared out the deps) and reinstalled it from scratch, and the dependency resolution proceeded correctly that time (wxwidgets was not installed).
TL;DR brew uninstall elixir && brew install elixir






















