killercup / cargo-edit

A utility for managing cargo dependencies from the command line.
http://killercup.github.io/cargo-edit/
MIT License
3.06k stars 147 forks source link

Mac m1 install failed #874

Open andreyddk opened 11 months ago

andreyddk commented 11 months ago

cargo-edit v0.12.2 macos v14 rust & cargo 1.73

cargo install cargo-edit

  = note: ld: warning: ignoring duplicate libraries: '-liconv'
          ld: warning: no platform load command found in '/private/var/folders/nl/cp7jwlld7nqdl1k46fp2glsm0000gn/T/rustcE575LS/symbols.o', assuming: macOS
          ld: Undefined symbols:
            _iconv, referenced from:
                _git_fs_path_iconv in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
            _iconv_close, referenced from:
                _git_fs_path_direach in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_iconv_clear in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_diriter_free in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
            _iconv_open, referenced from:
                _git_fs_path_direach in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_iconv_init_precompose in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
                _git_fs_path_diriter_init in liblibgit2_sys-7857c77508b5aafc.rlib[114](fs_path.o)
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile `cargo-edit` (bin "cargo-upgrade") due to previous error
error: failed to compile `cargo-edit v0.12.2`, intermediate artifacts can be found at `/var/folders/nl/cp7jwlld7nqdl1k46fp2glsm0000gn/T/cargo-installNuWyED`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
andreyddk commented 11 months ago

I found the solution. The problem was appear because updating macos result to unstable work of macports and homebrew, so I just delete the macports and problem was gone.