---
sidebar_position: 1400
---

# `cargo install` failed

It may fail to install [cargo type package](/docs/reference/registry-config/cargo-package) due to the failure of `cargo install` command.

e.g.

```console
$ broot -V
INFO[0000] Installing a crate                            aqua_version= env=darwin/arm64 package_name=crates.io/broot package_version=1.20.0 program=aqua registry=local
    Updating crates.io index
  Installing broot v1.20.0
   Compiling autocfg v1.1.0
   Compiling libc v0.2.144
   Compiling proc-macro2 v1.0.58
   Compiling cfg-if v1.0.0
   Compiling unicode-ident v1.0.8

   ...

   Compiling onig v6.4.0
   Compiling syntect-no-panic v4.6.1
   Compiling git2 v0.14.4
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/Users/shunsukesuzuki/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/shunsukesuzuki/google-cloud-sdk/bin:/Users/shunsukesuzuki/.local/share/zinit/polaris/bin:/Users/shunsukesuzuki/.pyenv/shims:/Users/shunsukesuzuki/go/bin:/Users/shunsukesuzuki/bin:/Users/shunsukesuzuki/.volta/bin:/Users/shunsukesuzuki/.local/share/aquaproj-aqua/bin:/Users/shunsukesuzuki/.local/bin:/Users/shunsukesuzuki/google-cloud-sdk/bin:/Users/shunsukesuzuki/.krew/bin:/Users/shunsukesuzuki/.rbenv/bin:/Users/shunsukesuzuki/.pyenv/bin:/Users/shunsukesuzuki/.cargo/bin:/Users/shunsukesuzuki/repos/bin:/Users/shunsukesuzuki/.nodebrew/current/bin:/usr/local/go/bin:/usr/local/Cellar/openssl/1.0.2s/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/opt/grep/libexec/gnubin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/sbin:/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "arm64" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/rustcPfnkTR/symbols.o" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/cargo-install7z2lUH/release/deps/broot-c24b215fd59bc137.broot.539ce56f-cgu.0.rcgu.o" "-L" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/cargo-install7z2lUH/release/deps" "-L" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/cargo-install7z2lUH/release/build/libgit2-sys-c1c8ec3646f53526/out/build" "-L" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/cargo-install7z2lUH/release/build/onig_sys-be106416281466e0/out" "-L" "/Users/shunsukesuzuki/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/rustcPfnkTR/libonig_sys-d53e6c5bb1b0706e.rlib" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/rustcPfnkTR/liblibgit2_sys-4a56a3cf540dfc80.rlib" "/Users/shunsukesuzuki/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-90099c6af476d811.rlib" "-lxcb" "-lxcb-render" "-lxcb-shape" "-lxcb-xfixes" "-liconv" "-framework" "Security" "-framework" "CoreFoundation" "-lz" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/shunsukesuzuki/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/cargo-install7z2lUH/release/deps/broot-c24b215fd59bc137" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -lxcb
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `broot` due to previous error
error: failed to compile `broot v1.20.0`, intermediate artifacts can be found at `/var/folders/lk/bw_hsbdd72l9ckd0tz61xz2m0000gn/T/cargo-install7z2lUH`
INFO[0109] removing the install directory because the installation failed  aqua_version= env=darwin/arm64 install_dir=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/cargo/crates.io/broot/1.20.0 package_name=crates.io/broot package_version=1.20.0 program=aqua registry=local
ERRO[0109] install the package                           aqua_version= env=darwin/arm64 error="cargo install: install a crate: exit status 101" package_name=crates.io/broot package_version=1.20.0 program=aqua registry=local
FATA[0109] aqua failed                                   aqua_version= env=darwin/arm64 error="it failed to install some packages" program=aqua
```

## What does this error mean?

aqua runs `cargo install` command to install `cargo` type packages, but `cargo install` command fails.

## How to solve the error

Probably this error isn't the issue of aqua.

Please run `cargo install` command and check if the issue can be reproduced without aqua.

e.g.

```console
$ cargo install --features clipboard broot
```

if you need help, please ask not aqua maintainers but Rust community.

We aren't familiar with Rust and Cargo, so we can't help you.
