Nix on MacOS Catalina

you can use docker to get linux on mac

cargo is rust though, it’s going to be the same tool on mac/linux

In that case a git checkout Cargo.lock should do help recover that. If that wouldn’t help the git data was probably damaged.

This is severely outdated. Have you tried rustup update?

I meant so I can use Nix

yes I’ve tried that, buutt… rustup default nightly worked

cargo --version
cargo 1.52.0-nightly (572e20153 2021-02-24)

however, still get:

cargo install --path crates/holochain

**Installing** holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)

**Updating** git repository `https://github.com/holochain/lmdb-rs.git`
**Updating** git repository `https://github.com/holochain/rkv.git`
**Updating** git repository `https://github.com/neonphog/tokio_safe_block_on.git`
**Updating** crates.io index
**Compiling** libc v0.2.86
**Compiling** proc-macro2 v1.0.24
**Compiling** syn v1.0.60
**Compiling** serde_derive v1.0.123
**error** **: linking with `cc` failed: exit code: 1**

**=** **note** : xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

**error** **: aborting due to previous error**
**error** **:** could not compile `serde_derive`
To learn more, run the command again with --verbose.
**warning** **:** build failed, waiting for other jobs to finish...

**error** **:** failed to compile `holochain v0.0.100 (/Users/Zeek/holochain/crates/holochain)`, intermediate artifacts can be found at `/Users/Zeek/holochain/target`

Caused by:

build failed

oh I see, that’s a good start :smiley: however we don’t require nightly so you could do rustup install stable && rustup default stable && rustup uninstall nightly

Stating that I’m not an expert on macOS is a strong understatement, however I believe @thedavidmeister already pointed out the solution for the missing xcrun here:

stable worked!! hooray :tada: :confetti_ball: :fireworks: :pray: :pray: :hugs:

THANK YOU ALL SO MUCH

3 Likes

I’m glad to see something worked eventually.
Can you summarize here recommendations for this, based on your experience now, for future-readers?

Nix was unable to install due to error about unencrypted / read-only something weird. I had both Xcode and rust/cargo installed from redux but old versions that had trouble updating

Solution Summary

decided to use cargo method instead of Nix https://doc.rust-lang.org/cargo/getting-started/installation.html

make sure to sudo xcode-select --reset https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

also rustup update and if that does not work

then regular instructions:

git clone https://github.com/holochain/holochain

cd holochain

cargo install --path crates/holochain

should work! (might have to close and reopen terminal)

if you get:

"
Caused by:

failed to parse lock file at: /Users/username/holochain/Cargo.lock

Caused by:

invalid serialized PackageId for key package.dependencies
"
then use

3 Likes