counter-rust-deprecated icon indicating copy to clipboard operation
counter-rust-deprecated copied to clipboard

yarn start error: `dyld: Library not loaded: @rpath/libLLVM.dylib`, `image not found`

Open thor314 opened this issue 4 years ago • 2 comments

Started the project with yarn start Got error: error: linking with rust-lld failed: signal: 6

Attempted fix: Visited rust_lld: https://github.com/tamird/rust_lld Ran: brew install llvm --HEAD --with-lld Got error: invalid option: --with-lld

Successfully ran tests:

cd contract
cargo test -- --nocapture

Note that I ran this locally, not on gitpod. Another note, npm install near-cli runs successfully, while sudo npm install near-cli -g fails with:

/usr/local/bin/near -> /usr/local/lib/node_modules/near-cli/bin/near

> [email protected] install /usr/local/lib/node_modules/near-cli/node_modules/node-hid
> prebuild-install || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access '/Users/thor/.npm'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/thor/Library/Caches/node-gyp/12.18.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/near-cli/node_modules/node-hid/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install

thor314 avatar Sep 28 '20 08:09 thor314

Longer copy paste of the first error:

  Compiling rust-counter-tutorial v0.1.0 (/Users/thor/rust/near/rust-counter/contract)
error: linking with `rust-lld` failed: signal: 6
  |
  = note: "rust-lld" "-flavor" "wasm" "-z" "stack-size=1048576" /* This goes on for a long chunk, ellided */
  = note: dyld: Library not loaded: @rpath/libLLVM.dylib
            Referenced from: /Users/thor/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/bin/rust-lld
            Reason: image not found

thor314 avatar Sep 28 '20 08:09 thor314

Reinstalled npm. same issue.

thor314 avatar Sep 28 '20 15:09 thor314