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

nixos-rebuild failed switching to unstable-channel #121947

Closed
rollschild opened this issue May 6, 2021 · 1 comment
Closed

nixos-rebuild failed switching to unstable-channel #121947

rollschild opened this issue May 6, 2021 · 1 comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@rollschild
Copy link

rollschild commented May 6, 2021

Issue description

Hi,

I'm very new to NixOS and have been tinkering the configuration.nix for almost a week. I am currently on 20.09. However, I would like to switch to unstable-channel, so I did the following:

$ sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
$ sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
$ sudo nixos-rebuild switch --upgrade

But the build failed with the following errors (I only pasted the logs with actual keywords like "failed" or "error"):

builder for '/nix/store/naqhj71jnyjwgzps1s5scrlpdf83jza9-gtk2-immodule.cache.drv' failed with exit code 127
builder for '/nix/store/lpsdcbn2hmrd0f04a0d7l67j1jfsmb0r-gtk3-immodule.cache.drv' failed with exit code 127
builder for '/nix/store/0d21dnxqvhchlzw07l3bymir7fasb17n-hwdb.bin.drv' failed with exit code 126
builder for '/nix/store/0pdrmsmvzlc7by52ksyhnzszbnqzljdr-neovim-0.4.4.drv' failed with exit code 1
builder for '/nix/store/dl1rzpx8sam3l37210p7854gyhgr8jz8-sway-1.6.drv' failed with exit code 126
cannot build derivation '/nix/store/0x2lcfys2ispldcki31np7zmpqqfscrm-etc.drv': 1 dependencies couldn't be built
building '/nix/store/fdhxhylf9hd4g5faw5gngchq9fl3b53g-linux-5.10.32-modules.drv'...
cannot build derivation '/nix/store/ddhb6cqwyrxs45f3kl41y8g6bdx655za-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/j4hm78y4bz8yi65swxnzm2l5gmaxpp68-nixos-system-nixos-21.05pre287161.d3ba49889a7.drv': 1 dependencies couldn't be built
error: build of '/nix/store/j4hm78y4bz8yi65swxnzm2l5gmaxpp68-nixos-system-nixos-21.05pre287161.d3ba49889a7.drv' failed

For this error message, I don't even know where to start debugging. The build for 20.09 worked fine for me and I didn't change my configuration.nix. I did find some useful information in #35020 but nix-store --verify --repair as suggested in that issue did not work for me.

How do I solve this? Thanks in advance!

Technical details

$ nix-shell -p nix-info --run "nix-info -m"                                                      ✔ 
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.114, NixOS, 20.09.4055.eb7e1ef185f (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.10`
 - channels(<myusername>): `""`
 - channels(root): `"nixos-21.05pre287161.d3ba49889a7, nixpkgs-21.05pre287202.123db833485"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@moni-dz moni-dz added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label May 6, 2021
@rollschild
Copy link
Author

I solved this myself. It turned out #35020 is useful. I did a $ sudo nix-store --verify --check-contents --repair and it solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

No branches or pull requests

2 participants