As far as I can tell, the switch-to-configuration script is not being run with Perl because the correct version of Perl was not installed.
If I run the switch-to-configuration script:
$ /nix/store/07cgxyc0wgd5qwwkk3afs8d9pwmxws4y-nixos-system-htpc-21.11.20220216.2128d0a/bin/switch-to-configuration
/nix/store/07cgxyc0wgd5qwwkk3afs8d9pwmxws4y-nixos-system-htpc-21.11.20220216.2128d0a/bin/switch-to-configuration: line 3: use: command not found
/nix/store/07cgxyc0wgd5qwwkk3afs8d9pwmxws4y-nixos-system-htpc-21.11.20220216.2128d0a/bin/switch-to-configuration: line 4: use: command not found
/nix/store/07cgxyc0wgd5qwwkk3afs8d9pwmxws4y-nixos-system-htpc-21.11.20220216.2128d0a/bin/switch-to-configuration: line 5: syntax error near unexpected token `('
/nix/store/07cgxyc0wgd5qwwkk3afs8d9pwmxws4y-nixos-system-htpc-21.11.20220216.2128d0a/bin/switch-to-configuration: line 5: `use File::Path qw(make_path);'
$ /nix/store/cwix2dqwbw4naaf8pzlgb7c9mgaxgzlv-perl-5.34.0-env/bin/perl --version
Failed to execute process '/nix/store/cwix2dqwbw4naaf8pzlgb7c9mgaxgzlv-perl-5.34.0-env/bin/perl'. Reason:
exec: unknown error (errno was 8)
The file '/nix/store/cwix2dqwbw4naaf8pzlgb7c9mgaxgzlv-perl-5.34.0-env/bin/perl' is marked as an executable but could not be run by the operating system.
If I look and see what that executable looks like, it seems to be empty?
This only is happening for one of my NixOS machines, not for any of the others with nearly identical configurations. They are built off of the same NixOps deployment, using the same version of nixpkgs.
Expected behavior
The switch-to-configuration command runs successfully.
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
Describe the bug
As far as I can tell, the
switch-to-configuration
script is not being run with Perl because the correct version of Perl was not installed.If I run the
switch-to-configuration
script:The first line of that script is:
But if I try to run that Perl executable, I get:
If I look and see what that executable looks like, it seems to be empty?
I'm not quite sure what's going on here.
Steps To Reproduce
This only is happening for one of my NixOS machines, not for any of the others with nearly identical configurations. They are built off of the same NixOps deployment, using the same version of nixpkgs.
Expected behavior
The
switch-to-configuration
command runs successfully.Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.