运行 yew 框架示例代码 - 错误:与 `cc` 链接失败:退出状态:1

发布于 2025-01-11 20:20:45 字数 1822 浏览 5 评论 0 原文

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

:链接到``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 找到中间工件,

原因为: 构建失败 摘要 无法安装 trunk、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

有什么想法吗?

I am trying to run the yew framework sample code and I running into this error when running cargo install trunk wasm-bindgen-cli

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

I am running rustc 1.60.0-nightly (2681f253b 2022-02-01)

Here's the output:

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

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-installCKNe4D

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

output:

//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

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文