nix-installer
nix-installer copied to clipboard
Failed suddenly in Darwin
I can use it normally the day before yesterday, but when I run sudo darwin-rebuild switch yesterday, it failed and told me this message.
I try to reinstall nix and reinstall macOS. But it tells me the same.
My Mac is macOS 10.12, it’s MacBook pro 2016.
Here is the output:
jason@jason-MacBook-Pro:~/ > nix
dyld[1153]: Symbol not found: (__ZTVNSt3__13pmr25monotonic_buffer_resourceE)
Referenced from: '/nix/store/y8v9ariyblm29ypgsq5i1vf8xsrfsm3q-nix-expr-2.31.2/lib/libnixexpr.dylib'
Expected in: '/usr/lib/libc++.1.dylib'
zsh: abort nix
jason@jason-MacBook-Pro:~/ >
I need help, thanks.
I use Determinate and use upstream nix. When I uninstall nix Darwin, it’s normal.
Here is the output:
jason@jason-MacBook-Pro:~/ > sudo darwin-uninstaller
Uninstalling nix-darwin, this will:
- remove /Applications/Nix Apps symlink
- cleanup static /etc files
- disable and remove all launchd services managed by nix-darwin
- restore nix-daemon service from the Nix installer
Proceed? [y/n] y
setting up /Applications/Nix Apps...
setting up pam...
applying patches...
setting up /etc...
setting up launchd services...
removing service org.nixos.activate-system
removing service org.nixos.nix-daemon
restoring unmanaged Nix daemon...
configuring networking...
configuring application firewall...
Enabled allow signed built-in applications automatically
Enabled allow signed downloaded applications automatically
Stealth mode disabled
configuring power...
setting up /Library/Fonts/Nix Fonts...
setting nvram variables...
dyld[1818]: Symbol not found: (__ZTVNSt3__13pmr25monotonic_buffer_resourceE)
Referenced from: '/nix/store/y8v9ariyblm29ypgsq5i1vf8xsrfsm3q-nix-expr-2.31.2/lib/libnixexpr.dylib'
Expected in: '/usr/lib/libc++.1.dylib'
/nix/store/ndhvyplkx8xgdxbqdwq5mbgfndhi3fm6-darwin-system-25.11/activate: line 311: 1818 Abort trap: 6 nix-channel --remove darwin
NOTE: the /run symlink will be removed on reboot
NOTE: The /nix/var/nix/profiles/system* profiles still exist and won't be garbage collected.
Done!
jason@jason-MacBook-Pro:~/ > nix
error: no subcommand specified
Try 'nix --help' for more information.
jason@jason-MacBook-Pro:~/ > nix-shell -p nix-info --run "nix-info -m"
warning: error: unable to download 'https://channels.nixos.org/flake-registry.json': Problem with the SSL CA cert (path? access rights?) (77) error setting certificate file: /etc/ssl/certs/ca-certificates.crt; using cached version
warning: error: unable to download 'https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable': Problem with the SSL CA cert (path? access rights?) (77) error setting certificate file: /etc/ssl/certs/ca-certificates.crt; using cached version
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
- system: `"x86_64-darwin"`
- host os: `Darwin 21.6.0, macOS 12.7.4`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.31.1`
- nixpkgs: `/nix/store/q4dfpr4f7ydjhwcf6048ppyi22gqwdyd-source`
jason@jason-MacBook-Pro:~/ >
I solve it by use determinate nix instead of upstream nix.
Use this one (in the image). You can try this way before the developers fix it.
Link these issues
- https://github.com/NixOS/nix/issues/14201
- https://github.com/nix-darwin/nix-darwin/issues/1606
- https://github.com/DeterminateSystems/nix-installer/issues/1684