How can I get a more verbose error message with nixos-rebuild

I’m getting this:

 paths will be fetched (89.93 MiB download, 383.38 MiB unpacked):
  /nix/store/i3mcdchja7x41dj6mknzy16cw1rpcrgx-curl-8.4.0
  /nix/store/jl16fcg30sin495jhcag0wlyngvcqpvm-curl-8.4.0-bin
  /nix/store/hh4gnflqcfs97kpnis44p1yf5jg1vmjk-curl-8.4.0-dev
  /nix/store/cb9784707mflgm5hc0ms8zfrj01adimi-elfutils-0.190-dev
  /nix/store/lvwdgsbcamflqfhydzqyc1ylvrwv4zfh-libffi-3.4.4
  /nix/store/6m1dbv9bmdiyjwzcbi15r8syp17yy6sn-libkrb5-1.20.2-dev
  /nix/store/xkfmhnfpwx87qn7sbhmkisl83ba18l3s-libssh2-1.11.0
  /nix/store/0y28w3rxffnhi1vf2x22g31h61qyvig3-libssh2-1.11.0-dev
  /nix/store/1a7bnzx9lash058zyy226256mm9g0vi8-linux-6.8.6-dev
  /nix/store/c88fyb3azb2plhyz7ynyi8lkyc290lzi-openssl-3.0.13-bin
  /nix/store/dly1kpml75dl2gymydrgwgnc8z6np7q1-openssl-3.0.13-dev
  /nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8
setting up chroot environment in '/nix/store/8kd6bkw3g720ig70ii6dwr3ym29891cj-ensure-all-wrappers-paths-exist.drv.chroot'
executing builder '/nix/store/m0s1xf30bdk6vfn5m6c3mhb2z8w1cib5-bash-5.2-p15/bin/bash'
using builder args '-e /nix/store/v6x3cs394jgqfbi0a42pam708flxaphh-default-builder.sh'
error:
       … while setting up the build environment

       error: getting attributes of path '/run/binfmt': No such file or directory

This doesn’t really help me;)

I also run nixos-rebuild with -vv

All I’m trying to do is nixos-rebuild. Can it somehow point me to what part of my configuration.nix it’s not liking, so that I can remove it?

there is the --show-trace flag, maybe that helps

Nope, still shows exactly the same

these 12 paths will be fetched (89.93 MiB download, 383.38 MiB unpacked):
  /nix/store/i3mcdchja7x41dj6mknzy16cw1rpcrgx-curl-8.4.0
  /nix/store/jl16fcg30sin495jhcag0wlyngvcqpvm-curl-8.4.0-bin
  /nix/store/hh4gnflqcfs97kpnis44p1yf5jg1vmjk-curl-8.4.0-dev
  /nix/store/cb9784707mflgm5hc0ms8zfrj01adimi-elfutils-0.190-dev
  /nix/store/lvwdgsbcamflqfhydzqyc1ylvrwv4zfh-libffi-3.4.4
  /nix/store/6m1dbv9bmdiyjwzcbi15r8syp17yy6sn-libkrb5-1.20.2-dev
  /nix/store/xkfmhnfpwx87qn7sbhmkisl83ba18l3s-libssh2-1.11.0
  /nix/store/0y28w3rxffnhi1vf2x22g31h61qyvig3-libssh2-1.11.0-dev
  /nix/store/1a7bnzx9lash058zyy226256mm9g0vi8-linux-6.8.6-dev
  /nix/store/c88fyb3azb2plhyz7ynyi8lkyc290lzi-openssl-3.0.13-bin
  /nix/store/dly1kpml75dl2gymydrgwgnc8z6np7q1-openssl-3.0.13-dev
  /nix/store/czqlzqjil64c5r4hrfdn1arxka24sya7-python3-minimal-3.11.8
error:
       … while setting up the build environment

       error: getting attributes of path '/run/binfmt': No such file or directory

I don’t understand how it can’t be possible to find out what’s causing this. I mean, it must be ultimately traceable if it happens when “something” is built. Where is “something”?:wink:

can I have a look at the code?

I don’t have it on a git repo, yet, so it’s a bit difficult, right now, since I can’t use my system.

I did, however, try to update the channels, and I get the same

sudo nix-channel --update
unpacking channels...
error:
       … while setting up the build environment

       error: getting attributes of path '/run/binfmt': No such file or directory
error: program '/nix/store/b9iwk28nd0h9z8gpyr3fcr1xjlwnavmc-nix-2.18.1/bin/nix-env' failed with exit code 1

, so this is something fubar.

You have a wrapper that contains binfmt which so broken. I would guess that you point it to a binary that doesn’t exist.

How about GitHub - maralorn/nix-output-monitor: Pipe your nix-build output through the nix-output-monitor a.k.a nom to get additional information while building.

ok, I found a solution.

  1. Create /run/binfmt
  2. Build and failboat
  3. rm /run/binfmt

Now all is dandy, but this is scary. It’s discomforting…

thanks;)

1 Like

I’ll install this and have it ready the next time I run into something like this. Hopefully never;)

Thanks.

1 Like