Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"nix-channel --update" fails -- "warning: the group 'nixbld' specified in 'build-users-group' does not exist" #3337

Open
drewboardman opened this issue Jan 28, 2020 · 6 comments
Labels

Comments

@drewboardman
Copy link

OS: Arch Linux 5.4.15-arch1-1
Nix Version: nix (Nix) 2.3.1

Steps taken

$ yay -S nix
$ sudo chown -R $USER. /nix/var/nix/{gcroots,profiles.db}
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable

$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable

$ nix-channel --update
unpacking channels...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
while setting up the build environment: executing '/usr/bin/bash': No such file or directory
builder for '/nix/store/083z09myxrv7dlj6py6x1sbdvf2b7mg2-nixpkgs-20.03pre210643.ec1c46e2e58.drv' failed with exit code 1
error: build of '/nix/store/083z09myxrv7dlj6py6x1sbdvf2b7mg2-nixpkgs-20.03pre210643.ec1c46e2e58.drv' failed
error: program '/usr/bin/nix-env' failed with exit code 100

After this, I tried with sudo (also described in the arch wiki):

$ sudo nix-channel --update
warning: the group 'nixbld' specified in 'build-users-group' does not exist
unpacking channels...
warning: the group 'nixbld' specified in 'build-users-group' does not exist
error: the group 'nixbld' specified in 'build-users-group' does not exist
error: program '/usr/bin/nix-env' failed with exit code 1
  • So, the two errors are saying:
  • no-sudo: my channel path doesn't exist
  • sudo: there is a group that doesn't exist

Checking on channel path

  • I want to make sure that its looking in the correct place, and that I have permissions:
$ echo $NIX_PATH
nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:
              /nix/var/nix/profiles/per-user/root/channels:
              /home/drew/.nix-defexpr/channels

# now I want to check what's in that home dir

$ ll ~/.nix-defexpr
total 8.0K
lrwxrwxrwx  1 drew users   44 Jan 21 17:32 channels_root -> /nix/var/nix/profiles/per-user/root/channels
lrwxrwxrwx  1 drew users   44 Jan 22 11:29 channels -> /nix/var/nix/profiles/per-user/drew/channels/
drwxr-xr-x  2 drew users 4.0K Jan 22 11:29 ./
drwx------ 35 drew users 4.0K Jan 27 16:45 ../

# checking to make sure I have permissions on those dirs

$ sudo ls -alh /nix/var/nix/profiles/per-user
total 16K
drwxr-xr-x 4 drew users 4.0K Jan 27 16:22 .
drwxr-xr-x 3 drew users 4.0K Jan 21 17:32 ..
drwxr-xr-x 2 drew users 4.0K Jan 27 16:09 drew
drwxr-xr-x 2 root root  4.0K Jan 27 16:22 root

# now I can see that those dirs don't exist (this seems to be an issue)

$ sudo ls -alh /nix/var/nix/profiles/per-user/root
total 8.0K
drwxr-xr-x 2 root root  4.0K Jan 27 16:22 .
drwxr-xr-x 4 drew users 4.0K Jan 27 16:22 ..

Attempted solution

  • Make that channels dir and try to update
  • fails
$ sudo mkdir /nix/var/nix/profiles/per-user/root/channels
$ sudo nix-channel --update
warning: the group 'nixbld' specified in 'build-users-group' does not exist
unpacking channels...
warning: the group 'nixbld' specified in 'build-users-group' does not exist
error: '/nix/var/nix/profiles/per-user/root/channels' is not a symlink
error: program '/usr/bin/nix-env' failed with exit code 1

$ nix-channel --update                                                                                                                                                       
unpacking channels...
while setting up the build environment: executing '/usr/bin/bash': No such file or directory
builder for '/nix/store/083z09myxrv7dlj6py6x1sbdvf2b7mg2-nixpkgs-20.03pre210643.ec1c46e2e58.drv' failed with exit code 1
error: build of '/nix/store/083z09myxrv7dlj6py6x1sbdvf2b7mg2-nixpkgs-20.03pre210643.ec1c46e2e58.drv' failed
error: program '/usr/bin/nix-env' failed with exit code 100
@drewboardman drewboardman changed the title warning: the group 'nixbld' specified in 'build-users-group' does not exist nix-channel --update fails -- warning: the group 'nixbld' specified in 'build-users-group' does not exist Jan 28, 2020
@drewboardman drewboardman changed the title nix-channel --update fails -- warning: the group 'nixbld' specified in 'build-users-group' does not exist "nix-channel --update" fails -- "warning: the group 'nixbld' specified in 'build-users-group' does not exist" Jan 28, 2020
@drewboardman
Copy link
Author

drewboardman commented Jan 28, 2020

Some info:

From the aur entry for nix I attempted to change the nix config sandbox mode to false.

$ cat ~/.config/nix/nix.conf
sandbox = false
substituters = https://cache.nixos.org https://all-hies.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k=

This allowed me to update channels without error (I think).

$ nix-channel --update
unpacking channels...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
created 1 symlinks in user environment

@makefu
Copy link

makefu commented Jan 28, 2020

for anyone who is interested, these were the steps i needed to install the latest nix (2.3.1), from AUR, on a fresh archlinux docker container:

$ docker run -ti archlinux
pacman --noconfirm -Sy base-devel
curl https://aur.archlinux.org/cgit/aur.git/snapshot/editline.tar.gz | tar xz && cd editline/
env EUID=1 makepkg -si --noconfirm  # hack to run makepkg as root
curl https://aur.archlinux.org/cgit/aur.git/snapshot/nix.tar.gz | tar xz && cd nix/
pacman --noconfirm -S libsodium boost brotli
env EUID=1 makepkg -si --noconfirm
useradd nixbld
gpasswd -a nixbld nixbld
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
NIX_PATH=/nix/var/nix/profiles/per-user/root/channels nix-shell -p python3

@veprbl
Copy link
Member

veprbl commented Jan 28, 2020

This issue belongs to NixOS/nix repository and not NixOS/nixpkgs

@drewboardman
Copy link
Author

This issue belongs to NixOS/nix repository and not NixOS/nixpkgs

The NixOS/nix issue placeholder text recommends posting in this issue board.

@stevenroose
Copy link

Did you get this to work? I'm also failing to update my nix system to unstable.

I think what you needed was archlinux-nix setup-build-group perhaps. (archlinux-nix is in AUR; see Arch wiki's page for nix)

@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants