레이블이 cargo인 게시물을 표시합니다. 모든 게시물 표시
레이블이 cargo인 게시물을 표시합니다. 모든 게시물 표시

homebrew disabled the alacritty cask

brew install alacritty 를 해도 안되고
 alacritty (disabled)

brew install --cask alacritty 를 해도 다음과 같이 mac gatekeeper 를 통과하지 못해 설치를 못한다고 한다.
Error: alacritty: Cask 'alacritty' has been disabled because it does not pass the macOS Gatekeeper check! It was disabled on 2026-09-01.

homebrew gatekeeper(맥에 내장된 기본 보안 기능으로 인터넷이나 외부 경로로 다운로드한 응용프로그램이 안전한지 검증하고 신뢰할 수 없으면 실행을 차단) 통과 필수 적용
- 5.0.0 릴리스 공지에서 gatekeeper 를 통과하는 패키지만 설치 가능
- cask 비활성화 사유를 unsigned에서 fails_gatekeeper_check로 바꾼 PR
- alacritty cask disable 처리
- alacritty 같이 .app을 빌드하는 formula는 받지 않는다는 규정

alacritty 대응
- 공증(gatekeepe 통과를 위한 서명) 논의https://github.com/alacritty/alacritty/issues/8749

공증을 받으려면 apple developer 계정이 필요하고 연 $99 비용이 든다.
메인테이너(chrisduerr)는 이를 "scam", "ransom" 이라고 거부하고 비용을 대신 내겠다는 댓글도 스팸으로 보겠다고 한다.
homebrew 가 소스를 받아 직접 빌드하고 서명해서 배포해야 한다고 주장하지만 homebrew는 .app을 빌드하는 formula를 받지 않고 있다.
homebrew 쪽에서 alacritty 전용 tap(외부 저장소, tap 있다면 brew install 가능하고, 맥에서 실행시 인증되지 않은 프로그램 허용하면 실행까지 된다.)을 만들라고 제안했지만 alacritty 는 만들지 않고 있다.

흠, 그냥 cargo 로 설치하자.
cargo install alacritty

rust incompatible architecture error

# 맥 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

rust unstable library error

# wsl 환경에서 cargo 로 bat 설치(빌드)시 
cargo install bat

# 다음과 같은 에러가 발생한다.
error[E0658]: use of unstable library feature 'is_terminal'
/home/ysoftman/.cargo/registry/src/github.com-1ecc6299db9ec823/grep-cli-0.1.8/src/lib.rs:238:23
std::io::stderr().is_terminal()

# rust 버전은 다음과 같다.
rustc --version
rustc 1.66.1 (90743e729 2023-01-10) (built from a source tarball)

# 메시지의 링크를 보면 이슈가 있다.

# unstable 상태가 에러가 아니라면 계속 진행하는 옵션을 줘도 실패한다.
cargo install -Z unstable-option --keep-going bat

# mac 에선 cargo 로 bat 설치시 똑같은 grep-cli v0.1.8 버전을 사용해 빌드하는데 잘된다.
# mac 에 설치된 grep-cli library 버전
cargo search grep-cli
grep-cli = "0.1.8"    # Utilities for search oriented command line applications.

# rustup 을 설치해서 rustc/cargo 버전을 올려보자.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# cargo 가 제대로 동작하지 않는다면 다음과 같이 삭제 후 재설치한다.
rustup uninstall stable && rustup install stable

# 최신 버전 확인
cargo --version
cargo 1.71.0 (cfd3bbd8f 2023-06-08)

# 이제 빌드 에러 없이 설치된다.
cargo install bat

vscode rust language server 문제

# vscode 에서 RLS(rust language server) 플러그인을 사용한다.
https://marketplace.visualstudio.com/items?itemName=rust-lang.rust

# 그런데 상태 바에 RLS starting 계속 진행중이되면서
# formatting, completion 등이 동작하지 않는다.
# 원인은 cargo 로 생성한 여러 프로젝트들을 하나의 vsocde 에서 열게 되서 발생한것이다.
# 현재는 RLS 가 동작하려면 vscode 의 최상위(root)위치에 cargo.toml 이 있어야 한다.
# 해당 이슈는 현재 수정 중으로 좀더 있으면 개선 될것 같다.
https://github.com/rust-lang/rls-vscode/pull/601

# 참고로 단순히 하나의 프로젝트만 vscode 로 열면 잘 동작한다.
# 그리고 이때 RLS 설치가 되면 다시 멀티 프로젝트를 열었을때
# 빌드 등은 안되지만 formatting, completion 등은 작동한다.

Prev