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

Nix not working after Monterey update #6912

Open
camilafracaro opened this issue Aug 17, 2022 · 5 comments
Open

Nix not working after Monterey update #6912

camilafracaro opened this issue Aug 17, 2022 · 5 comments
Labels
bug installer macos Nix on macOS, aka OS X, aka darwin

Comments

@camilafracaro
Copy link

Describe the bug

My nix stopped working after the migration to Monterey. I've run curl -L https://nixos.org/nix/install | sh and followed the steps 1-3. and now I have this error:

~~> Installing Nix
cp: cannot overwrite directory /nix/store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Resources with non-directory ./store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Resources
cp: cannot overwrite directory /nix/store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Versions/A/Resources with non-directory ./store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Versions/A/Resources
cp: cannot overwrite directory /nix/store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Versions/Current with non-directory ./store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Versions/Current
cp: cannot overwrite directory /nix/store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Headers with non-directory ./store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit/Library/Frameworks/IOKit.framework/Headers
cp: cannot overwrite directory /nix/store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Versions/Current with non-directory ./store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Versions/Current
cp: cannot overwrite directory /nix/store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Headers with non-directory ./store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Headers
cp: cannot overwrite directory /nix/store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Modules with non-directory ./store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Modules
cp: cannot overwrite directory /nix/store/nshcnznnc8rdn87y4xb3wiihrmfl2qx6-libkrb5-1.19.3/sbin with non-directory ./store/nshcnznnc8rdn87y4xb3wiihrmfl2qx6-libkrb5-1.19.3/sbin
cp: cannot overwrite directory /nix/store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Resources with non-directory ./store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Resources
cp: cannot overwrite directory /nix/store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Versions/A/Resources with non-directory ./store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Versions/A/Resources
cp: cannot overwrite directory /nix/store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Versions/Current with non-directory ./store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Versions/Current
cp: cannot overwrite directory /nix/store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Headers with non-directory ./store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security/Library/Frameworks/Security.framework/Headers
cp: cannot overwrite directory /nix/store/yhm2ayipn22kp0cyr3mqq71ihk2za056-libkrb5-1.19.3/sbin with non-directory ./store/yhm2ayipn22kp0cyr3mqq71ihk2za056-libkrb5-1.19.3/sbin

---- oh no! --------------------------------------------------------------------
Jeeze, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team:
 - Matrix: #nix:nixos.org
 - IRC: in #nixos on irc.libera.chat
 - twitter: @nixos_org
 - forum: https://discourse.nixos.org

If you have a problem with a specific package or NixOS,
you probably want to file an issue at https://github.com/NixOS/nixpkgs/issues.

Steps To Reproduce

  1. Run curl -L https://nixos.org/nix/install | sh
  2. Create a copy of zshrc.backup-before-nix and zshrc
  3. Run sudo mv /etc/zshrc.backup-before-nix /etc/zshrc
  4. Run step 1 again
  5. See error

Expected behavior

To install nix.

nix-env --version output

Additional context

Add any other context about the problem here.

@abathur
Copy link
Member

abathur commented Aug 17, 2022

You don't have to reinstall after an update. The update is overwriting the shell hook, but you can just replace it. See #3616 for more.

If you've deleted things already, though, you may have to follow the uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos

@camilafracaro
Copy link
Author

camilafracaro commented Aug 17, 2022

I'm installing because one of the services we use said that it was not installed and for me to run the curl above.
I added the code in #3616 and after following steps to remove .zshrc, it gives me the error below. I think I tried to uninstall before and I dismounted it, how can I have that file back?

~~> Configuring LaunchDaemon to mount 'Nix Store'
/Library/LaunchDaemons/org.nixos.darwin-store.plist: Service is disabled
Bootstrap failed: 119: Unknown error: 119
Could not find service "org.nixos.darwin-store" in domain for system

---- oh no! --------------------------------------------------------------------
Jeeze, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team:
 - Matrix: #nix:nixos.org
 - IRC: in #nixos on irc.libera.chat
 - twitter: @nixos_org
 - forum: https://discourse.nixos.org

@edolstra edolstra added macos Nix on macOS, aka OS X, aka darwin installer labels Aug 17, 2022
@abathur
Copy link
Member

abathur commented Aug 17, 2022

If you follow the uninstall directions linked above, it should install cleanly after.

one of the services we use said that it was not installed and for me to run the curl above.

If this is some sort of public service, it might be worth reporting this up to them.

@somebodyLi
Copy link

If you've deleted things already, though, you may have to follow the uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos

after delete everything and uninstall follow the docs, but it can't install successful any more in Macos Monterey 12.5.1 ..........

@camilafracaro
Copy link
Author

I uninstalled it and now it's working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug installer macos Nix on macOS, aka OS X, aka darwin
Projects
None yet
Development

No branches or pull requests

4 participants