FS#71447 - "nix-channel --update" cannot find bash in its build environment

Attached to Project: Community Packages
Opened by Sam A. Horvath-Hunt (samhh) - Monday, 05 July 2021, 14:52 GMT
Last edited by George Rawlinson (rawlinsong) - Monday, 05 July 2021, 19:47 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To George Rawlinson (rawlinsong)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

`nix-channel --update` fails with the following error on a system that has never before run nix and was following the wiki:

```
$ nix-channel --update --verbose
downloading 'https://nixos.org/channels/nixpkgs-unstable'...
unpacking channels...
while setting up the build environment: executing '/usr/bin/bash': No such file or directory
builder for '/nix/store/mh8hl6c7gyyqrnzrln4j2jxg79n32slf-nixpkgs-21.11pre300283.f930ea227ce.drv' failed with exit code 1
error: build of '/nix/store/mh8hl6c7gyyqrnzrln4j2jxg79n32slf-nixpkgs-21.11pre300283.f930ea227ce.drv' failed
error: program '/usr/bin/nix-env' failed with exit code 100
```

Additional info:

nix package version: 2.3.13-3
config: only the effect of running `nix-channel --add https://nixos.org/channels/nixpkgs-unstable` per the wiki
misc: I don't appear to be the first person to encounter this problem. Others workaround this problem by installing nix manually and avoiding the Arch package: https://github.com/NixOS/nix/issues/2673#issuecomment-487773657

Steps to reproduce (following wiki):

1. Install `nix` from the main repo
2. Enable and start `nix-daemon.service`
3. Add your user to the `nix-users` group (and reboot)
4. Run `nix-channel --add https://nixos.org/channels/nixpkgs-unstable`
5. Run `nix-channel --update`
This task depends upon

Closed by  George Rawlinson (rawlinsong)
Monday, 05 July 2021, 19:47 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Added more examples to Troubleshooting section of Wiki.

tl;dr disable sandboxing.

Loading...