NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.69k stars 1.51k forks source link

macOS 12.6 (21G115) update broke nix? #7030

Open messis opened 2 years ago

messis commented 2 years ago
  1. After updating macOS to macOS 12.6 (21G115) nix was not working.

  2. Ran sh <(curl -L https://nixos.org/nix/install)

  3. Fixed these files as requested: /etc/bashrc /etc/bashrc.backup-before-nix /etc/zshrc.backup-before-nix

  4. Ran sh <(curl -L https://nixos.org/nix/install) again, got:

~~> Installing Nix

---- sudo execution ------------------------------------------------------------ I am executing:

$ sudo cp -RPp ./store/0ky7rhm0ckf4vw7vg2v5cyarrbsblvmj-aws-crt-cpp-0.17.28 ./store/1dcbaii28xnv98zw2w5f0skn2mar1ck8-aws-c-auth-0.6.13 ./store/2033pdgsv4wgl0zx6nng9i8q5f4h18lk-libidn2-2.3.2 ./store/2im4pw4pl5zsr6mjhwrjfcinrl9qljhy-nss-cacert-3.80 ./store/3b8r3yspv7f7p92jfxg548cfxi7q19d7-bash-5.1-p16 ./store/3k2ygb7mk9ylm2r5g0iad7akg1qwas4g-libssh2-1.10.0 ./store/3qcn93slgnm0wz74fq3nsd2942k3vsfm-aws-c-cal-0.5.17 ./store/58ppyba9pbc8yxqiw11gv9aw2adh1lgg-libxml2-2.9.14 ./store/6d17z21w7h8vmpsnmr8dm73sb3mvkpp0-nlohmann_json-3.10.5 ./store/789cl5k5ca0m9sxkiqyl4ackv5f0cmfz-aws-sdk-cpp-1.9.238 ./store/79z2m5vwbqwzrmfsbbv6rvk04z2nzf0x-curl-7.83.1 ./store/7hn69mlypdg285ar3ia71prgcrsx521g-libiconv-50 ./store/7m37v9mnii266p2l21xl97s4666f7d2s-libarchive-3.6.1-lib ./store/7vfyla60szbi8h35q93mrsij6whb3q9q-aws-c-compression-0.2.14 ./store/8yr5vy7jasrizvnvm9d12iynbbvf8r3p-nghttp2-1.47.0-lib ./store/962rka435k9c9p5ng1z2y3gspi4gs7hr-libcxxabi-11.1.0 ./store/9h5pks3l96gkp7653x4jxsfz1ca41fdc-aws-c-io-0.11.0 ./store/9jzvhm113w1xndcc5p4lvbqpqvk01c17-aws-c-mqtt-0.7.10 ./store/9x2z66kf8g8p9y1bxkraspghsy8jb5nj-zstd-1.5.2 ./store/a08j7vsgfcvzx0ahl986v38mjrx3gkm0-brotli-1.0.9-lib ./store/blnw8pnh6srwwr31g23mh6b70g6viaam-libcxx-11.1.0 ./store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0 ./store/cpl9nndqjgn238p3kdwws845gscavfh4-sqlite-3.38.5 ./store/czwp4nmcn5skjiylhbyhg5k21wv76w9j-libsodium-1.0.18 ./store/d1hxdg09lxql958cmnrjq68alnd73i39-aws-c-s3-0.1.39 ./store/dg4r67wwna6sb2drh7gj38byq91ix2z9-aws-c-common-0.7.0 ./store/gwxhwcf0m9yrhz5wql1181bjfp654m1b-zlib-1.2.12 ./store/h9z5lncphgm9if86wxrfqg7w7fv7khbh-libkrb5-1.19.3 ./store/jgwmpgiin89dp0jjpjlwily6fgj1xs1a-aws-c-sdkutils-0.1.2 ./store/kd48xgjihd6sz5gvf2bvj7kw7m7ybhmf-xz-5.2.5 ./store/lr32i0bdarx1iqsch4sy24jj1jkfw9vf-nix-2.11.0 ./store/n2bygl2nqg7r35mg4ny45cwkarxgx2xb-curl-7.83.1 ./store/nf20p297fz6sfs97m7rl7al9ywchi83n-openssl-1.1.1q ./store/p7755cvgiwvv6lvin1r25jy711p8fn2n-libunistring-1.0 ./store/r6y0rvzx8z9z459ghmj1zrnpi4r7xa5v-aws-checksums-0.1.12 ./store/s5ikc3jlv67j9bm8463rjz3x09lcwm8v-aws-c-http-0.6.15 ./store/v2p3injpwnyf31vfllpz2k172mr58fn9-apple-lib-libDER ./store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0 ./store/w18g47jdi000hq064cb83j42kmbc4k3s-editline-1.17.1 ./store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0 ./store/xi7bwrkki4fwr6zam7gmcklnqq3f3d5h-aws-c-event-stream-0.2.7 ./store/y9j96x0zkxwwbqknr66r7bwczlxa4kk6-bzip2-1.0.6.0.2 ./store/y9rzzima6wdy0ph29ff09hr8vadfkx16-libobjc-11.0.0 ./store/z1l79b1phxy2yzcwsvn0ar121gcnh0x6-boehm-gc-8.0.6 /nix/store/

to copy the basic Nix files to the new store at /nix/store

cp: cannot overwrite directory /nix/store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Versions/Current with non-directory ./store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Versions/Current cp: cannot overwrite directory /nix/store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers with non-directory ./store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Headers cp: cannot overwrite directory /nix/store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Modules with non-directory ./store/cfc8xcp3q1ccx9wrfkbagia95w6rsvsh-apple-framework-Security-11.0.0/Library/Frameworks/Security.framework/Modules cp: cannot overwrite directory /nix/store/h9z5lncphgm9if86wxrfqg7w7fv7khbh-libkrb5-1.19.3/sbin with non-directory ./store/h9z5lncphgm9if86wxrfqg7w7fv7khbh-libkrb5-1.19.3/sbin cp: cannot overwrite directory /nix/store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Versions/Current with non-directory ./store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Versions/Current cp: cannot overwrite directory /nix/store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Headers with non-directory ./store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Headers cp: cannot overwrite directory /nix/store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Modules with non-directory ./store/vzbnm6afkdcbgb57npl06gk7rsap4sfy-apple-framework-CoreFoundation-11.0.0/Library/Frameworks/CoreFoundation.framework/Modules cp: cannot overwrite directory /nix/store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Versions/Current with non-directory ./store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Versions/Current cp: cannot overwrite directory /nix/store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Headers with non-directory ./store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Headers cp: cannot overwrite directory /nix/store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Modules with non-directory ./store/w5n081lpdyhc5aa69cq59j9s1h626jgj-apple-framework-IOKit-11.0.0/Library/Frameworks/IOKit.framework/Modules

---- 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:

abathur commented 2 years ago

You'll have to follow the uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos

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

divanorama commented 2 years ago

Hit the same issue. Maybe the installed could link to uninstall docs when it fails? My "fix" was to rm -rf /nix/, move away /etc/zshrc.backup-before-nix and /etc/bashrc.backup-before-nix and re-run the installer