zhaofengli / nix-homebrew

Homebrew installation manager for nix-darwin
MIT License
273 stars 13 forks source link

Get error on install #18

Closed SolidRhino closed 4 months ago

SolidRhino commented 8 months ago

I try to install homebrew with this module on a Mac with x86 CPU. I get the following error:

setting up Homebrew (/usr/local)...
ln: /usr/local/Homebrew/Library/Homebrew: No such file or directory

Is there a way I can fix this?

ratbag98 commented 7 months ago

I had the same error on a machine that had previously been managed by Nix Darwin and had homebrew installed, then deleted (but manually). The problem for me was the /usr/local/.managed_by_nix_darwin file that was left behind from before. I deleted that with sudo rm /usr/local/.managed_by_nix_darwin and everything worked as hoped. Some of the install script is gatekept by this file.

jamesbrink commented 5 months ago

sudo rm /usr/local/.managed_by_nix_darwin

Thank you so much! this needs to be in the readme or maybe part of the code. i was losing my mind chasing this down lol