Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install ohrs 失败 #21

Closed
jiabochao opened this issue Jul 21, 2024 · 5 comments
Closed

cargo install ohrs 失败 #21

jiabochao opened this issue Jul 21, 2024 · 5 comments

Comments

@jiabochao
Copy link

  • Apple M2 Pro
  • macOS 14.5
bochao@BochaodeMBP hello_ohos % cargo install ohrs        
    Updating crates.io index
  Installing ohrs v0.5.2
    Updating crates.io index
     Locking 88 packages to latest compatible versions
      Adding bitflags v1.3.2 (latest: v2.6.0)
      Adding generic-array v0.14.7 (latest: v1.1.0)
      Adding git2 v0.18.3 (latest: v0.19.0)
      Adding idna v0.5.0 (latest: v1.0.2)
      Adding libgit2-sys v0.16.2+1.7.2 (latest: v0.17.0+1.8.1)
      Adding linux-raw-sys v0.4.14 (latest: v0.6.4)
      Adding redox_syscall v0.4.1 (latest: v0.5.3)
   Compiling libc v0.2.155
   Compiling pkg-config v0.3.30
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling vcpkg v0.2.15
   Compiling version_check v0.9.4
   Compiling typenum v1.17.0
   Compiling serde v1.0.204
   Compiling cfg-if v1.0.0
   Compiling tinyvec_macros v0.1.1
   Compiling rustix v0.38.34
   Compiling tinyvec v1.8.0
   Compiling bitflags v2.6.0
   Compiling camino v1.1.7
   Compiling generic-array v0.14.7
   Compiling unicode-bidi v0.3.15
   Compiling serde_json v1.0.120
error: failed to run custom build command for `generic-array v0.14.7`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/generic-array-3ab10ad6b55e9cb2/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `proc-macro2 v1.0.86`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/proc-macro2-b35825358680b6ee/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `libc v0.2.155`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/libc-69fc1ce02ad5b6cc/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `rustix v0.38.34`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/rustix-747af681e5b11bd7/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `typenum v1.17.0`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/typenum-cd1b97ae7285ff9a/build-script-main` (signal: 9, SIGKILL: kill)
error: failed to compile `ohrs v0.5.2`, intermediate artifacts can be found at `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
bochao@BochaodeMBP hello_ohos % rustup --version
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.79.0 (129f3b996 2024-06-10)`
bochao@BochaodeMBP hello_ohos % rustc --version
rustc 1.79.0 (129f3b996 2024-06-10)
bochao@BochaodeMBP hello_ohos % cargo --version 
cargo 1.79.0 (ffa9cf99a 2024-06-03)
bochao@BochaodeMBP hello_ohos % 
Copy link

@richerfu Please check this issue, thanks.

@richerfu
Copy link
Member

richerfu commented Jul 22, 2024

重置环境试下,看起来是环境导致的构建失败。之前出现过 git2 构建失败。 @jiabochao

@jiabochao
Copy link
Author

重置环境试下,看起来是环境导致的构建失败。之前出现过 git2 构建失败。 @jiabochao

重置环境是重新安装一下rust环境吗

@richerfu
Copy link
Member

重置环境试下,看起来是环境导致的构建失败。之前出现过 git2 构建失败。 @jiabochao

重置环境是重新安装一下rust环境吗

是的 同时尝试清理各种用户自定义配置项。比如用户级别的 config.toml 等

@jiabochao
Copy link
Author

jiabochao commented Oct 11, 2024

参考如下issue

执行如下命令问题解决

brew uninstall binutils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants