0

Am experiencing this error:

# All required OS packages found.
The following actions will be performed:
  ∗ install tezos-rust-libs 1.1
  ∗ install bls12-381-unix  0.4.3
===== ∗ 2 =====

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
[bls12-381-unix.0.4.3] found in cache
[tezos-rust-libs.1.1] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
[ERROR] The compilation of tezos-rust-libs failed at "/Users/leotreasure/.opam/opam-init/hooks/sandbox.sh build cargo
        build --target-dir target --release".

#=== ERROR while compiling tezos-rust-libs.1.1 ================================#
# context     2.0.0 | macos/x86_64 | ocaml-base-compiler.4.10.2 | git+https://gitlab.com/tezos/opam-repository.git#28c81453b41d5414a0d32af8fe10c5197f43d360
# path        ~/tezos/_opam/.opam-switch/build/tezos-rust-libs.1.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build cargo build --target-dir target --release
# exit-code   101
# env-file    ~/.opam/log/tezos-rust-libs-22501-e4db2f.env
# output-file ~/.opam/log/tezos-rust-libs-22501-e4db2f.out
### output ###
# error: failed to acquire package cache lock
# 
# Caused by:
#   failed to open: /Users/leotreasure/.cargo/.package-cache
# 
# Caused by:
#   Operation not permitted (os error 1)



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
┌─ The following actions failed
│ λ build tezos-rust-libs 1.1
2
  • I have tried running the command as user with sudo: sudo ~/.opam/opam-init/hooks/sandbox.sh build cargo build --target-dir target --release and copying in the requested Cargo.toml files but get: /Users/leotreasure/.opam/opam-init/hooks/sandbox.sh: line 51: OPAM_SWITCH_PREFIX: unbound variable
    – leo
    Oct 20 at 3:45
  • Not sure what fixed it but after these steps, tezos-rust-libs was able to be installed: sudo chown -R $(whoami) /Users/leotreasure/.cargo cargo clean cargo build sudo cargo clean
    – leo
    Oct 23 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.