nix icon indicating copy to clipboard operation
nix copied to clipboard

failed to install nix because the build group nixbld already exists,

Open dodysitorus opened this issue 1 year ago • 1 comments

ocu@docu-X456UR:~$ sh <(curl -L https://nixos.org/nix/install) --daemon % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 4052 100 4052 0 0 1040 0 0:00:03 0:00:03 --:--:-- 1967 downloading Nix 2.20.1 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.20.1/nix-2.20.1-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.Fu2EeYxER3'... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 21.5M 100 21.5M 0 0 806k 0 0:00:27 0:00:27 --:--:-- 1762k Note: a multi-user installation is possible. See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation Switching to the Multi-user Installer Welcome to the Multi-User Nix Installation

This installation tool will set up your computer with the Nix package manager. This will happen in a few stages:

  1. Make sure your computer doesn't already have Nix. If it does, I will show you instructions on how to clean up your old install.

  2. Show you what I am going to install and where. Then I will ask if you are ready to continue.

  3. Create the system users (uids [30001..30032]) and groups (gid 30000) that the Nix daemon uses to run builds. To create system users in a different range, exit and run this tool again with NIX_FIRST_BUILD_UID set.

  4. Perform the basic installation of the Nix files daemon.

  5. Configure your shell to import special Nix Profile files, so you can use Nix.

  6. Start the Nix daemon.

Would you like to see a more detailed list of what I will do? [y/n] y

I will:

  • make sure your computer doesn't already have Nix files (if it does, I will tell you how to clean them up.)
  • create local users (see the list above for the users I'll make)
  • create a local group (nixbld)
  • install Nix in to /nix
  • create a configuration file in /etc/nix
  • set up the "default profile" by creating some Nix-related files in /root
  • back up /etc/bash.bashrc to /etc/bash.bashrc.backup-before-nix
  • update /etc/bash.bashrc to include some Nix configuration
  • load and start a service (at /etc/systemd/system/nix-daemon.service and /etc/systemd/system/nix-daemon.socket) for nix-daemon

Ready to continue? [y/n] y

---- let's talk about sudo ----------------------------------------------------- This script is going to call sudo a lot. Every time I do, it'll output exactly what it'll do, and why.

Just like this:

---- sudo execution ------------------------------------------------------------ I am executing:

$ sudo echo

to demonstrate how our sudo prompts look

This might look scary, but everything can be undone by running just a few commands. I used to ask you to confirm each time sudo ran, but it was too many times. Instead, I'll just ask you this one time:

Can I use sudo? [y/n] y

Yay! Thanks! Let's get going!

~~> Checking for artifacts of previous installs Before I try to install, I'll check for signs Nix already is or has been installed on this system.

---- Nix config report --------------------------------------------------------- Temp Dir: /tmp/tmp.5isUTnR6kQ Nix Root: /nix Build Users: 32 Build Group ID: 30000 Build Group Name: nixbld

build users: Username: UID nixbld1: 30001 nixbld2: 30002 nixbld3: 30003 nixbld4: 30004 nixbld5: 30005 nixbld6: 30006 nixbld7: 30007 nixbld8: 30008 nixbld9: 30009 nixbld10: 30010 nixbld11: 30011 nixbld12: 30012 nixbld13: 30013 nixbld14: 30014 nixbld15: 30015 nixbld16: 30016 nixbld17: 30017 nixbld18: 30018 nixbld19: 30019 nixbld20: 30020 nixbld21: 30021 nixbld22: 30022 nixbld23: 30023 nixbld24: 30024 nixbld25: 30025 nixbld26: 30026 nixbld27: 30027 nixbld28: 30028 nixbld29: 30029 nixbld30: 30030 nixbld31: 30031 nixbld32: 30032

Ready to continue? [y/n] y

~~> Setting up the build group nixbld

---- oh no! -------------------------------------------------------------------- It seems the build group nixbld already exists, but with the UID 998. This script can't really handle that right now, so I'm going to give up.

You can fix this by editing this script and changing the NIX_BUILD_GROUP_ID variable near the top to from 30000 to 998 and re-run.

We'd love to help if you need it.

You can open an issue at https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

dodysitorus avatar Feb 17 '24 11:02 dodysitorus

Do you know if you previously customized a nix install, or perhaps already installed nix with your system package manager? If the latter, you'll need to remove that one before installing.

If the former, you should probably follow the uninstall instructions here: https://nixos.org/manual/nix/stable/installation/uninstall.html#linux

abathur avatar Feb 17 '24 22:02 abathur