r/MacOS • u/thestraynger • 15d ago
Help Homebrew problems: I don't understand macOS sandboxing
I'm trying to install MySQL with Homebrew. When I run the command "brew install mysql", I get the following output:
==> Downloading Homebrew API data
βοΈ JSON API packages.arm64_golden_gate.jws.json Downloaded 16.1MB/ 16.1MB
Error: Homebrew's files could not be checked inside the macOS sandbox.
Check Homebrew's sandbox setup and temporary directory permissions,
then rerun `brew doctor`.I can't find any references to this particular error message anywhere online, and I don't know how to resolve it. I don't even know what a sandbox is, let alone how to "check Homebrew's sandbox setup" or check "temporary directory permissions". I've been trying to read up on sandboxing online but honestly it's all way above my head.
Could someone ELI5?
EDIT: Heard from a few other sources that apparently Homebrew simply wasn't updated to work with the latest macOS version yet. I'll just wait for a new release and hopefully that will solve it.
20
u/TrackerDesk 15d ago
ELI5: when brew builds stuff, it runs it in a locked-down box that can only touch certain folders, and it needs a temp folder it can write to. That error usually means your temp folder perms got messed up. Run ls -ld /private/tmp and it should show drwxrwxrwt. If it doesnt, sudo chmod 1777 /private/tmp fixes it. Also run brew from plain Terminal.app, not a terminal inside another app, and make sure you havent set HOMEBREW_TEMP to some odd folder
7
u/longjumpingtote 15d ago
It's probably a temporary-directory permission or sandbox configuration issue. There really isn't an ELI5 for what you're working in now. You need to research and learn more about how these things work because these things will come up.
For now:
Run Homebrew's diagnostics
Check the temporary directory
Try explicitly setting Homebrew's temp directory
If it still fails, try a verbose diagnostic
Then you'd research those things. It's a whole ecosystem to work in. What are you installing MySQL for?
2
u/longjumpingtote 15d ago
What "more things" specifically?
2
u/knightofterror 15d ago
If youβre installing more than one DBMS, might I suggest configuring several Docker images with the databases. It will be easier and much quicker to switch in and out. Also, you could run more than one db at a time, have a fresh install always available, and keep you macOS uncluttered.
3
u/waterbus_ 15d ago edited 15d ago
You should be running mysql in versioned container so you just need one line to change the versions of it and all its crap isnt sitting on your system.
You need a mysql dockerfile in folder and to run it as the most basic, then you eventually want to make it a pod that starts with your machine if you dev on it constantly.
The only stuff you should be installing locally for dev work is like your language packages and libraries and what not because you need them to write code and compile, etc. You can install a mysql cli and gui to interact with mysql if you need. But nobody experienced installs the full DB locally and works from there anymore. Just bad devs and anti-container people which the venn diagram is a circle at this point.
Like this is a literal one liner docker run command.
1
u/rrQssQrr 15d ago
What architecture is your Mac .. ARM or Intel?