본문 바로가기
IOS - Swift

[iOS/Xcode] CocoaPods 설치 오류(gem)

by 게게겍 2023. 3. 3.

 Apple M1 Pro and macOS Monterey 기준입니다.

 

ERROR: While executing gem ... (Gem::FilePermissionError)   You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.

HomeBrew에서 cocoapod를 설치할때 위와같은 에러가 난다면..

1단계(HomeBrew 설치)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )

2단계(터미널에서 이 두 명령을 실행하여 Homebrew를 PATH에 추가)

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/”귀하의 사용자 FORLDER”/.zprofile

eval "$(/opt/homebrew/bin/brew shellenv)"

3단계(이제 cocoapods를 설치할 수 있음)