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

Install error: cp: cannot overwrite directory with non-directory #6970

Open
hgezim opened this issue Aug 28, 2022 · 4 comments
Open

Install error: cp: cannot overwrite directory with non-directory #6970

hgezim opened this issue Aug 28, 2022 · 4 comments
Labels
bug installer macos Nix on macOS, aka OS X, aka darwin

Comments

@hgezim
Copy link

hgezim commented Aug 28, 2022

Describe the bug

I'm having trouble installing nix on Mac OS 10.15.7 (19H2026).

Steps To Reproduce

I somehow ended up with a bad install which I tried to rectify by installing nix package manager again.

  1. curl -L https://nixos.org/nix/install > ~/tmp/nix.sh
  2. sh ~/tmp/nix.sh
  3. Answer yes to all the prompt
  4. Had to replace /etc/bashrc and /etc/zshrc with their version before nix changed them.

Expected behavior

A clean install of nix.

Actual behaviour

~~> Installing Nix

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

    $ sudo cp -RPp ./store/01mj3sckpsccjs2xxkk5g7785l9q768x-libcxxabi-11.1.0 ./store/0d4w6hxjncsm1x4ayzji5wrj6pcwcdyz-libcxx-11.1.0 ./store/0s4dy5cxk02v4vy12vpsxgl8l6p0i8y7-aws-c-cal-0.5.17 ./store/1gmc7mq6ksmafv820l6waqcz0f68xvcs-nghttp2-1.47.0-lib ./store/33kam22n5s3xk7nynxlncfs811s40x8n-libunistring-1.0 ./store/36bphb5sgp7h18fd3vcsgwap0j3vvdmd-aws-c-mqtt-0.7.10 ./store/3b7qrm0qjw57fmznrsvm0ai568i89hc2-nix-2.10.3 ./store/3h7vf3h57xp29p892iqvvq54h8nkv297-apple-framework-IOKit ./store/4hagigi0c3dk6ycy6bv3r8hkpjnrscvg-aws-c-io-0.11.0 ./store/5crz0l3klajnqchl0zll1ia19n0ljs32-swift-corefoundation-unstable-2018-09-14 ./store/76ikx0n8my0fazvb5wpnqnnp2xpimq65-brotli-1.0.9-lib ./store/7vxmz5dm7s0hbi22858y17fmhv10cf5z-zlib-1.2.12 ./store/8alsm9gqyk5rw7f4g4j755dnn85ll3m0-aws-c-common-0.7.0 ./store/8f6xjpndby58qj1qb8s5d5kmgp72wrb9-ICU-66108 ./store/8gvak51060yi23l4jp1wqjmxg5llcyb5-aws-checksums-0.1.12 ./store/8p5nq2py3rvsfw5ggxhcvw11zad0mm31-libsodium-1.0.18 ./store/ak4rvddc8pc92517clbsxsdvxb4q3fq7-nlohmann_json-3.10.5 ./store/apfhy056b71zn4v5mbhf400pmv52f507-libxml2-2.9.14 ./store/awy40gzv04g1ci7vgdq5zana1p5y0yxw-brotli-1.0.9-lib ./store/bips4w9xvhai6apsg8qiilw475gizlkd-libidn2-2.3.2 ./store/bjqn7i9is9497nraf9rsf0hmxh07jwb7-aws-crt-cpp-0.17.28 ./store/bpsvbbaxg9bfr5713d2if4cbs3zr8iir-zstd-1.5.2 ./store/d4bnnxjkn38pgpds7r1y9vd5m0cb6wga-libcpuid-0.5.1 ./store/fn6kkg71q3wb6px5n3b89z14rhvii1xn-bash-5.1-p16 ./store/frjb9fdj74fpn28fgvv11lrjcd9xcpx5-aws-c-compression-0.2.14 ./store/gczjd9h3waj8429xp2npm1lzk0ikwz4d-aws-c-event-stream-0.2.7 ./store/gs5bangbwjz6c1f7338774mnlqrdfv6w-libxml2-2.9.14 ./store/j7bys3pgw4zw3hysmnrwq0yd98babgvv-nss-cacert-3.80 ./store/jsz92lnyyp7dg9zpzxlfv999aka35f3v-libarchive-3.6.1-lib ./store/lcgnx0cr553ayjckhrvizx2lyb2a32mb-aws-c-http-0.6.15 ./store/lia296li259j33qlcarkn63lrdz9c6jj-nghttp2-1.47.0-lib ./store/m4wi5pqk1adk6nliqr69lgvzrxqn80gm-zstd-1.5.2 ./store/mlbfnviskhzpzkchz413iphlj1bhpxbi-editline-1.17.1 ./store/mvdxfn7rkc0lsdy92ga0v1pnbnp8a1id-xz-5.2.5 ./store/ni8221ym8df3iff8vn864pf4v7rm79ic-Libsystem-1238.60.2 ./store/nshcnznnc8rdn87y4xb3wiihrmfl2qx6-libkrb5-1.19.3 ./store/pigxdm5lqd65lgq48dl2c3h13kxa491f-libunistring-1.0 ./store/qqgg5fcx2kx36mwnfpn2fmkcy5v79imn-apple-framework-Security ./store/r7w766yb2z8khrpr4fcb2y6d5qwlaz64-aws-c-sdkutils-0.1.2 ./store/ra3i02ijg39vbcck953jqqw1lbh0l3ri-libiconv-50 ./store/rhqnvv72hyqpy1ks3nhxf3i7p5ln0ipf-curl-7.83.1 ./store/rk6ipzg00lms7fyns3ci4rc4qn3ngihb-curl-7.83.1 ./store/rn4qkv2v85cf34b9h4ph1gcrxbbyv68k-aws-c-auth-0.6.13 ./store/rwg8g6ksjh2d9l76by4m255qc6kiq33b-aws-sdk-cpp-1.9.238 ./store/rxk9grzm1g1nz94km0k16z17myjdzmlw-libidn2-2.3.2 ./store/sc0iy8zwqfxxl8zc41dwa6frhxmjd5r8-curl-7.83.1 ./store/v0q15kxg3kvr4gdqw6vgb4397d8kwn9j-libssh2-1.10.0 ./store/vg4b2xd0g0ln3x4g0z73qk594livgdgp-openssl-1.1.1q ./store/vjxi76i81q1vy03vs56wghm1br6s5qr1-openssl-1.1.1q ./store/vk4gdpzhnj8h7nvsmjrs4mdbm5qzd93w-bzip2-1.0.6.0.2 ./store/x0lp3g632wilrz4cqca434vh21wmky3b-aws-c-s3-0.1.39 ./store/x3d5m05l3gdwkx4yd50ypl9hn7nfsv7i-boehm-gc-8.0.6 ./store/xbf3l20aca299dfg7isdprzxwklgj7n9-sqlite-3.38.5 ./store/xwl2dxqqfyx2lf20sb7vx4hx3dx7i3q9-libssh2-1.10.0 ./store/yhm2ayipn22kp0cyr3mqq71ihk2za056-libkrb5-1.19.3 /nix/store/

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

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.

...
@hgezim hgezim added the bug label Aug 28, 2022
@abathur
Copy link
Member

abathur commented Aug 28, 2022

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

@hgezim
Copy link
Author

hgezim commented Aug 29, 2022 via email

@abathur
Copy link
Member

abathur commented Aug 29, 2022

The instructions tell you to remove the volume the files it fails to overwrite are on.

@edolstra edolstra added installer macos Nix on macOS, aka OS X, aka darwin labels Aug 29, 2022
@hgezim
Copy link
Author

hgezim commented Oct 11, 2022 via email

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

3 participants