0

我正在尝试运行yew 框架 示例代码,并且在运行时遇到此错误cargo install trunk wasm-bindgen-cli

error: linking with ``cc`` failed: exit status: 1

我在跑步rustc 1.60.0-nightly (2681f253b 2022-02-01)

这是输出:

error: failed to compile `trunk v0.14.0`, intermediate artifacts can be found at `/var/folders/gp/n2f6jp996t93rzc9dhyldyr40000gn/T/cargo-installicBllO`

原因:构建失败错误:编译失败wasm-bindgen-cli v0.2.79,中间工件可以在/var/folders/gp/n2f6jp996t93rzc9dhyldyr40000gn/T/cargo-installCKNe4D

原因:构建失败摘要无法安装主干,wasm-bindgen-cli(请参阅上面的错误)。错误:一些板条箱安装失败

输出:

//some output before
JmxvNA/release/build/proc-macro2-a0e6a8ec316499c4/build_script_build-a0e6a8ec316499c4" "-Wl,-dead_strip" "-nodefaultlibs" "-fuse-ld=/usr/local/bin/zld"
  = note: clang: error: invalid linker name in argument '-fuse-ld=/usr/local/bin/zld'
          

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folder

//Some output here
note: clang: error: invalid linker name in argument '-fuse-ld=/usr/local/bin/zld'
          

error: failed to compile `trunk v0.14.0`, intermediate artifacts can be found at `/var/folders/gp/n2f6jp996t93rzc9dhyldyr40000gn/T/cargo-installkiOHan`

Caused by:
  build failed
error: failed to compile `wasm-bindgen-cli v0.2.79`, intermediate artifacts can be found at `/var/folders/gp/n2f6jp996t93rzc9dhyldyr40000gn/T/cargo-installJmxvNA`

Caused by:
  build failed
     Summary Failed to install trunk, wasm-bindgen-cli (see error(s) above).
error: some crates failed to install

有任何想法吗?

4

0 回答 0