# 맥 m1 에서 cargo 로 coreaudio-sys 를 사용하는 패키지들을 설치시 컴파일에서 다음과 아키텍쳐 에러가 발생했다.
cargo install scope-tui termusic termusic-server
... 생략 ...
error: failed to run custom build command for `coreaudio-sys v0.2.17`
... 생략 ...
'/opt/homebrew/Cellar/llvm/20.1.7/lib/libclang.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')
# brew 설치한 rustc 외 cargo bin에 rustc 가 있고 이걸 우선 사용하게 되어 있었고
which -a rustc
/Users/ysoftman/.cargo/bin/rustc
/opt/homebrew/bin/rustc
# 다음과 같이 확인해 보니 rustc 가 x86_64 기준으로 설치되어 있었다.
~/.cargo/bin/rustc -vV
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-apple-darwin
release: 1.88.0
LLVM version: 20.1.5
# ~/.cargo 의 rust 를 삭제하자.(~/.cargo 를 모두 삭제하게 된다.)
rustup self uninstall
# rust 를 새로 설치하자.(~/.cargo 등의 경로가 생성된다.)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# 이제 다시 확인해보면 aarch64(arm64) 로 보이고 문제가 됐던 툴도 제대로 컴파일/설치 된다.
~/.cargo/bin/rustc -vV
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: aarch64-apple-darwin
release: 1.88.0
LLVM version: 20.1.5
comments:
댓글 쓰기