DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 2 million installs.
GNU Lesser General Public License v2.1
2.02k stars 52 forks source link

Error uninstalling after upgrading to macOS 15 beta #1092

Closed rscorer closed 3 days ago

rscorer commented 1 month ago

Error

Error: 
   0: Error reverting
   0: Action `create_users_and_group` errored
      Multiple child errors

      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld1"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)

      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld2"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)

      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld3"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)

      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld4"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)

Metadata

key value
version 0.16.0
os macos
arch aarch64
cole-h commented 1 month ago

Did you update this machine to the macOS 15 beta while Nix was already installed?

rscorer commented 1 month ago

I did, I wondered about that just after sending the bug report...

cole-h commented 1 month ago

Was there something specific that caused you to want to uninstall? (Like Nix not working in some specific way after the upgrade?)

We don't currently have a good path for macOS <15 users to upgrade to macOS 15 (though we do have preliminary support for fresh installations as of v0.20.2). There's some more information on this issue upstream: https://github.com/NixOS/nix/issues/10892

If you want to uninstall and reinstall (with v0.20.2 or newer), you may need to do some surgery on the receipt (/nix/receipt.json) we generated to trick the uninstaller into thinking we never actually created the _nixbld{1,2,3,4} users (which macOS stole from us in the update). I can provide more in-depth instructions on what I'd try, if that would be helpful.

rscorer commented 4 weeks ago

I was getting the error "the user '_nixbld1' in the group 'nixbld' does not exist" when trying to update my flakes

After searching for the error, I didn't find anything relevant (one person talking about migrating a Mac system didn't seem relevant -- perhaps it was!)

So I thought I'll simply uninstall and re-install, I've got all my nix setup files safely stored it would appear to be the easiest option.

koalazub commented 2 weeks ago

I was able to resolve this issue on Beta 2: https://discord.com/channels/1116012109709463613/1116012112360251445/1270949139458424832

You essentially do just have to uninstall and reinstall and it should function fine. I'm using M3 Pro for clarification.