I would like to install Homebrew on Ubuntu Core. I do not have a use case for this yet, but I think it might be useful for me in the future or for others. Other immutable distros do support Homebrew as an alternative to system package manager.
Homebrew installation requires curl and git. I have installed curl using Snap (but I don’t think it’s functional enough as it cannot write to non-hidden files), but git is not available (apt is not available either).
Relevant System Information:
Ubuntu Core 24 in Multipass in (x86) macOS.
Screenshots or Error Messages:
$ sudo snap install git
error: snap "git" not found
I do not know what Homebrew is or if it can be installed on Ubuntu Core. So, I did a little Internet reading. I asked Google AI this question: “Does Homebrew support installing snap packaged applications?” This is the reply I got back.
AI Overview
No, Homebrew does not support installing snap packages because they are fundamentally different package management systems. Homebrew is primarily for macOS and Linux, installing applications directly, while Snaps are a separate, self-contained universal Linux packaging format that can only be installed with the snap command or a graphical snap store. However, you can use Homebrew to install the snap command-line tool on a Mac, which then allows you to interact with snap files
These are the two web sites that the AI program provided as the source for its summary.
Canonical is taking a radically different approach to creating its immutable operating system.
Different is not wrong. It is just different.
P.S. In case you did not know. If Homebrew cannot install snap packages then there is no point in installing it in Ubuntu Core because Ubuntu Core will only run snap packages. If Homebrew is not available as a snap package, then it can never be installed on Ubuntu Core.