Warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring

These warnings occur after installing from curl https://nixos.org/nix/install | sh

$ alias nh
nh='nix-shell https://holochain.love'
$ nh
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
# you can just run
$ nix-shell https://holochain.love

What I did before nh

 10:00:28  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ curl https://nixos.org/nix/install | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2399  100  2399    0     0   2007      0  0:00:01  0:00:01 --:--:--  2007
downloading Nix 2.3.1 binary tarball for x86_64-linux from 'https://nixos.org/releases/nix/nix-2.3.1/nix-2.3.1-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.Zc6Cydv76I'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15.2M  100 15.2M    0     0  1860k      0  0:00:08  0:00:08 --:--:-- 2505k
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jr /nix' using sudo
copying Nix to /nix/store................................
installing 'nix-2.3.1'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
building '/nix/store/cb6ss4jv8baxkq2pi6fnviqp9zyna73l-user-environment.drv'...
created 6 symlinks in user environment
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

Installation finished!  To ensure that the necessary environment
variables are set, either log in again, or type

  . /home/jr/.nix-profile/etc/profile.d/nix.sh

in your shell.

 10:00:58  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0  18s 
$ . /home/jr/.nix-profile/etc/profile.d/nix.sh

Full steps to reproduce for me:

 10:14:26  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ sudo rm -rf /nix /etc/nix  
[sudo] password for jr: 

 10:16:29  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0  6s 
$ alias cn
cn='curl https://nixos.org/nix/install | sh'

 10:16:48  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ cn
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2399  100  2399    0     0   2004      0  0:00:01  0:00:01 --:--:--  2004
downloading Nix 2.3.1 binary tarball for x86_64-linux from 'https://nixos.org/releases/nix/nix-2.3.1/nix-2.3.1-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.djHx0Q8Utr'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15.2M  100 15.2M    0     0  1863k      0  0:00:08  0:00:08 --:--:-- 2553k
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jr /nix' using sudo
copying Nix to /nix/store................................
installing 'nix-2.3.1'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
building '/nix/store/cb6ss4jv8baxkq2pi6fnviqp9zyna73l-user-environment.drv'...
created 6 symlinks in user environment
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

Installation finished!  To ensure that the necessary environment
variables are set, either log in again, or type

  . /home/jr/.nix-profile/etc/profile.d/nix.sh

in your shell.

 10:17:07  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0  17s 
$ . /home/jr/.nix-profile/etc/profile.d/nix.sh

 10:17:15  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ nh
unpacking 'https://holochain.love'...
unpacking 'https://github.com/NixOS/nixpkgs/archive/821c7ed030bca86c8217e6d20df1f01c6474adf4.tar.gz'...
unpacking 'https://github.com/mozilla/nixpkgs-mozilla/tarball/200cf0640fd8fdff0e1a342db98c9e31e6f13cd7'...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
# snip

I’ve also tried installing yay -a nix (from the AUR) but that causes an error in Error while loading shared libraries: libboost_context.so.1.69.0: cannot open shared object file: No such file or directory, and a patch is needed to change the dependency for boost to 1.69.

I found https://github.com/NixOS/nixpkgs/issues/40165, and that I need to add a channel to fix this warning.

So I tried:

 10:23:14  ✘  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ export NIX_PATH=nixpkgs=nixpkgs=channel:nixos-19.03


 10:23:18  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ nix-channel --update
unpacking channels...

 10:23:25  jr@fm  ~/nix-from-pkg-build  ⬡ v8.16.0 
$ nh
warning: Nix search path entry 'nixpkgs=channel:nixos-19.03' does not exist, ignoring
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment
# snip
$ nix-channel --add https://nixos.org/channels/nixos-19.09 nixos

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

$ nh
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring

The warnings in this Reddit post is closer to what I’m getting:

$  sudo nix-channel --list

outputs nothing

$ 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 '/nix/store/6chjfy4j6hjwj5f8zcbbdg02i21x1qsi-nix-2.3.1/bin/nix-env' failed with exit code 1

Same error on arch, although in a different place here: https://github.com/NixOS/nix/issues/697#issuecomment-190924250

I tried the hack there to get a missing channels/nixpkgs warning:

$ sudo mkdir /etc/nix/
[sudo] password for jr:
 10:50:17  jr@fm  ~  ⬡ v8.16.0 
$ sudo nano /etc/nix/nix.conf
$ cat /etc/nix/nix.conf
build-users-group =


$  10:50:59  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nh
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
these derivations will be built:
#snip

Tried this, warning changed:

$ export NIX_PATH=nixpkgs=nixpkgs=channel:nixos-19.03

$ nix-channel --update

unpacking channels...
 10:53:09  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nh
warning: Nix search path entry 'nixpkgs=channel:nixos-19.03' does not exist, ignoring
 10:56:55  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --list
nixos https://nixos.org/channels/nixos-19.09
nixpkgs https://nixos.org/channels/nixpkgs-unstable

 10:57:10  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ sudo nix-channel --list

Tried:

 10:55:09  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --add https://nixos.org/channels/nixos-19.09 nixos

$ nix-channel --update
unpacking channels...

$ nh
warning: Nix search path entry 'nixpkgs=channel:nixos-19.03' does not exist, ignoring
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment

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

$ sudo nix-channel --list

11:01:35  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ export NIX_PATH=nixpkgs=nixpkgs=channel:nixos-19.09

 11:01:40  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --update
unpacking channels...

 11:01:47  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nh
warning: Nix search path entry 'nixpkgs=channel:nixos-19.09' does not exist, ignoring
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment
these derivations will be built:
  /nix/store/59pxibmry9qgnpfj64pd8qhjjw8ii26j-sim2h_server-v0.0.38-alpha14-x86_64-generic-linux-gnu.tar.gz.drv
  /nix/store/hdsq1kkvf1gflb5yk1145i6qx0f6iq83-rust.drv
  /nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv
  /nix/store/gq192dvrhi35i2cmkgxxa8qxvmjbzpi5-hc.drv
  /nix/store/wzs4m2n7xs6kddx5b8v1y0wbphmrn7ij-trycp_server-v0.0.38-alpha14-x86_64-generic-linux-gnu.tar.gz.drv
  /nix/store/hzj1rmbm9a9yx2bz6cpwb5kw7bj5lfvv-trycp_server.drv
  /nix/store/rk12y7hz68b5p8ba294nhq07dvw18di0-sim2h_server.drv
building '/nix/store/hdsq1kkvf1gflb5yk1145i6qx0f6iq83-rust.drv'...
unpacking sources
unpacking source archive /nix/store/qf8ks81hjncyrycsqjj3vqlhjb8pp19z-rust-nightly-x86_64-unknown-linux-gnu.tar.xz
^Cerror: interrupted by the user

 11:01:53  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --list
nixos https://nixos.org/channels/nixos-19.09
nixpkgs https://nixos.org/channels/nixpkgs-unstable

 11:02:10  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --remove
error: '--remove' requires one argument
Try 'nix-channel --help' for more information.

 11:03:04  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --remove nixpkgs
uninstalling 'nixpkgs-20.03pre205792.fb1bc1b891f'
building '/nix/store/2ilrd9nwpbnsn35m26ldminqdd926sdz-user-environment.drv'...
created 1 symlinks in user environment

 11:03:10  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nh     
warning: Nix search path entry 'nixpkgs=channel:nixos-19.09' does not exist, ignoring
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment
these derivations will be built:
  /nix/store/59pxibmry9qgnpfj64pd8qhjjw8ii26j-sim2h_server-v0.0.38-alpha14-x86_64-generic-linux-gnu.tar.gz.drv
  /nix/store/hdsq1kkvf1gflb5yk1145i6qx0f6iq83-rust.drv
  /nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv
  /nix/store/gq192dvrhi35i2cmkgxxa8qxvmjbzpi5-hc.drv
  /nix/store/wzs4m2n7xs6kddx5b8v1y0wbphmrn7ij-trycp_server-v0.0.38-alpha14-x86_64-generic-linux-gnu.tar.gz.drv
  /nix/store/hzj1rmbm9a9yx2bz6cpwb5kw7bj5lfvv-trycp_server.drv
  /nix/store/rk12y7hz68b5p8ba294nhq07dvw18di0-sim2h_server.drv
building '/nix/store/hdsq1kkvf1gflb5yk1145i6qx0f6iq83-rust.drv'...
unpacking sources
unpacking source archive /nix/store/qf8ks81hjncyrycsqjj3vqlhjb8pp19z-rust-nightly-x86_64-unknown-linux-gnu.tar.xz
^Cerror: interrupted by the user

 11:03:31  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --add https://nixos.org/channels/nixos-19.09 nixpkgs


 11:04:13  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --update
unpacking channels...
created 2 symlinks in user environment

 11:04:27  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭  7s 
$ nh
warning: Nix search path entry 'nixpkgs=channel:nixos-19.09' does not exist, ignoring
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment
these derivations will be built:
  /nix/store/59pxibmry9qgnpfj64pd8qhjjw8ii26j-sim2h_server-v0.0.38-alpha14-x86_64-generic-linux-gnu.tar.gz.drv
  /nix/store/hdsq1kkvf1gflb5yk1145i6qx0f6iq83-rust.drv
  /nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv
  /nix/store/gq192dvrhi35i2cmkgxxa8qxvmjbzpi5-hc.drv
  /nix/store/wzs4m2n7xs6kddx5b8v1y0wbphmrn7ij-trycp_server-v0.0.38-alpha14-x86_64-generic-linux-gnu.tar.gz.drv
  /nix/store/hzj1rmbm9a9yx2bz6cpwb5kw7bj5lfvv-trycp_server.drv
  /nix/store/rk12y7hz68b5p8ba294nhq07dvw18di0-sim2h_server.drv
building '/nix/store/hdsq1kkvf1gflb5yk1145i6qx0f6iq83-rust.drv'...
unpacking sources
unpacking source archive /nix/store/qf8ks81hjncyrycsqjj3vqlhjb8pp19z-rust-nightly-x86_64-unknown-linux-gnu.tar.xz
^Cerror: interrupted by the user

 11:04:34  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nix-channel --list
nixos https://nixos.org/channels/nixos-19.09
nixpkgs https://nixos.org/channels/nixos-19.09

 11:04:55  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ echo $NIX_PATH
nixpkgs=nixpkgs=channel:nixos-19.09
# after running nh the first time, output is implementation specific to Holochain
 11:10:01  ✘  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭  52s 
$ nh
warning: Nix search path entry 'nixpkgs=channel:nixos-19.09' does not exist, ignoring
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment

[nix-shell:~/hcr]$ 

logging out and back in:


 11:13:18  jr@fm  ~/hcr  ⬡ v8.16.0  🦀 1.33.0-nightly   946-feature-chain-pair ✘ ⬇ ⬆ ✚ ✭ 
$ nh
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
these paths will be fetched (8.35 MiB download, 39.70 MiB unpacked):
# snip

[nix-shell:~/hcr]$ exit

I might come back to this later, although I may just ignore it unless more serious issues occur.

You did install it single-user, but /nix/var/nix/profiles/per-user/root/channels/nixpkgs is used only for multi-user setup.

Perhaps this is installer bug (it shouldn’t add this path to NIX_PATH for single-user installations).

To install Nix as multi-user, use yes | sh <(curl https://nixos.org/nix/install) --daemon.

1 Like

OK cheers, no I don’t need multi-user AFAI can tell ATM.

Because warnings could cause issues with CI builds, I’ve created a draft Dockerfile.manjaro here that builds nix from curl and enters a Holochain development environment in the nix-shell:


FROM samip537/manjaro

RUN su user

RUN sudo curl https://nixos.org/nix/install | sh

RUN . /home/user/.nix-profile/etc/profile.d/nix.sh

RUN nix-shell https://holochain.love --run echo

While I haven’t actually built the Docker image and pulled it to test, I did run the commands from within a Docker Manjaro base image, as shown here:

https://pastebin.com/FE98je25

The last step, nix-shell https://holochain.love --run echo, fails with this error (with the full output at the end of the above link):

building '/nix/store/h6n68sr4q6hkbsg1wzvnzmmkxzd3h22d-rust-std.drv'...
/nix/store/1zpvvxqxypyx2hlsg4zm7jdh1dc7z7cz-stdenv-linux/setup: line 813: /build/env-vars: No such file or directory
unpacking sources
/nix/store/1zpvvxqxypyx2hlsg4zm7jdh1dc7z7cz-stdenv-linux/setup: line 813: /build/env-vars: No such file or directory
unpacking source archive /nix/store/08px0migjsmcf0rh5zg8c8nqqjwm7da0-rust-std-nightly-wasm32-unknown-unknown.tar.xz
source root is rust-std-nightly-wasm32-unknown-unknown
find: '/build/..': No such file or directory
patching sources
/nix/store/1zpvvxqxypyx2hlsg4zm7jdh1dc7z7cz-stdenv-linux/setup: line 813: /build/env-vars: No such file or directory
configuring
/nix/store/1zpvvxqxypyx2hlsg4zm7jdh1dc7z7cz-stdenv-linux/setup: line 813: /build/env-vars: No such file or directory
no configure script, doing nothing
building
/nix/store/1zpvvxqxypyx2hlsg4zm7jdh1dc7z7cz-stdenv-linux/setup: line 813: /build/env-vars: No such file or directory
no Makefile, doing nothing
installing
/nix/store/1zpvvxqxypyx2hlsg4zm7jdh1dc7z7cz-stdenv-linux/setup: line 813: /build/env-vars: No such file or directory
patching script interpreter paths in install.sh
install.sh: interpreter directive changed from "/bin/bash" to "/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash"
mktemp: failed to create file via template '/build/tmp.XXXXXXXXXX': No such file or directory
builder for '/nix/store/h6n68sr4q6hkbsg1wzvnzmmkxzd3h22d-rust-std.drv' failed with exit code 1
cannot build derivation '/nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv': 1 dependencies couldn't be built
error: build of '/nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv', '/nix/store/gq192dvrhi35i2cmkgxxa8qxvmjbzpi5-hc.drv', '/nix/store/hzj1rmbm9a9yx2bz6cpwb5kw7bj5lfvv-trycp_server.drv', '/nix/store/rk12y7hz68b5p8ba294nhq07dvw18di0-sim2h_server.drv' failed