Getting an error when updating NixOS

I want the new kde plasma 6.3 so I tried to update my system with:

sudo nix-channel --update
sudo nix flake update
sudo nixos-rebuild switch --upgrade --flake .

After downloading everything I got this error:

kronix@nixos:~/nix/ > sudo nixos-rebuild switch --upgrade --flake .                                 
building the system configuration...
error: builder for '/nix/store/8ydhq7ddw4flml0n4rczw38q346wnr78-libiodbc-3.52.16.drv' failed with exit code 1;
       last 25 log lines:
       > cp ./iodbctest.c /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/share/libiodbc/samples/iodbctest.c
       > cp ./Makefile.sample /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/share/libiodbc/samples/Makefile
       > make[3]: Leaving directory '/build/libiodbc-3.52.16/samples'
       > make[2]: Nothing to be done for 'install-data-am'.
       > make[2]: Leaving directory '/build/libiodbc-3.52.16/samples'
       > make[1]: Leaving directory '/build/libiodbc-3.52.16/samples'
       > make[1]: Entering directory '/build/libiodbc-3.52.16'
       > make[2]: Entering directory '/build/libiodbc-3.52.16'
       > make[2]: Nothing to be done for 'install-exec-am'.
       > make[2]: Nothing to be done for 'install-data-am'.
       > make[2]: Leaving directory '/build/libiodbc-3.52.16'
       > make[1]: Leaving directory '/build/libiodbc-3.52.16'
       > Running phase: fixupPhase
       > shrinking RPATHs of ELF executables and libraries in /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16
       > shrinking /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/lib/libiodbcinst.so.2.1.31
       > shrinking /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/lib/libiodbc.so.2.1.31
       > shrinking /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/bin/iodbctest
       > shrinking /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/bin/iodbctestw
       > checking for references to /build/ in /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16...
       > gzipping man pages under /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/share/man/
       > patching script interpreter paths in /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16
       > /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/bin/iodbc-config: interpreter directive changed from "#!/bin/sh" to "/nix/store/fd118hwh7d1ncib4mdw56ylv3g9k0iyj-bash-5.2p37/bin/sh"
       > stripping (with command strip and flags -S -p) in  /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/lib /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/bin
       > ERROR: noBrokenSymlinks: the symlink /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/lib/libodbc.a points to a missing target /nix/store/da9crr71ixxz7fsc1m92shjfsxfyfw65-libiodbc-3.52.16/lib/libiodbc.a
       > ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks
       For full logs, run 'nix log /nix/store/8ydhq7ddw4flml0n4rczw38q346wnr78-libiodbc-3.52.16.drv'.
error: 1 dependencies of derivation '/nix/store/fg76g34cbzcxgqz5xrc53s06924f0jhb-mysql-workbench-8.0.41.drv' failed to build
error: 1 dependencies of derivation '/nix/store/68dqf2ykvf24qy1c8363zv7ddwdiph0i-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/b8968y3sdv4bagxi215iwbx6jcixv2m6-nixos-system-nixos-25.05.20250216.d74a233.drv' failed to build
kronix@nixos:~/nix/ >
kronix@nixos:~/nix/ > nix log /nix/store/8ydhq7ddw4flml0n4rczw38q346wnr78-libiodbc-3.52.16.drv | head
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/kciy2lbxs0pncfq7wqqk24l4xp3kjpv9-libiodbc-3.52.16.tar.gz
source root is libiodbc-3.52.16
setting SOURCE_DATE_EPOCH to timestamp 1683026464 of file "libiodbc-3.52.16/include/config.h.in"
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Updating Autotools / GNU config script to a newer upstream version: ./admin/config.sub
error: writing to file: Broken pipe
kronix@nixos:~/nix/ >

Can anyone help me?

Thanks in advance!

So this issue got mentioned on github:

The fix was however merged yesterday to master.

1 Like

Thanks for linking the issue. If is already merged why do I still get the error?

Wait until it reaches nixos-unstable:

https://nixpkgs-tracker.ocfox.me/?pr=381767

Also this command does nothing useful for you when using flakes.

2 Likes

That’s because it is only merged to master yet. Unstable may take a while.

Is it because the sudo nix flake update updates the channel the flake uses?
Thanks for letting me know btw!

Yes, and unless the files in the flake are owned by root for some reason, you don’t need sudo to update the flake inputs either

1 Like

Flakes don’t use channels. They are an alternative approach for managing the version of nixpkgs and other nix-related git repos on your system. All that version information gets recorded in your flake.lock file.