iOS 학습 노트 - CocoaPods 설치 및 문제 해결

1394 단어
1.gem 업데이트
sudo gem update --system

다음 오류가 발생할 수 있습니다.
error: while executing gem ...(error:EPERM) Operation no permitted -/usr/bin/update_rubygems
다음 명령을 입력합니다.
sudo gem update -n /usr/local/bin --system

2. Redy 소스 업데이트 2.1 시스템 소스 보기, 명령 입력
gem sources -l

일반적인 경우 기본 루비 소스는
https://rubygems.org/
국내에서는 사용할 수 없기 때문에 사용할 수 있는 루비 원본을 교체해야 합니다. 먼저 검색된 원본을 제거해야 합니다.
gem sources --remove https://rubygems.org/

그리고 사용할 수 있는 원본을 추가합니다.
gem source -a https://gems.ruby-china.org/

원래 타오바오 미러는 현재 사용 중인 루비 원본을 사용할 수 없습니다.https://gems.ruby-china.org/
만약 오류가 발생하면 https 요청에 인증서가 필요합니다
error:ssl verification error at depth 1:unable to get local issuer certificate(20) error:you must add/O=Digital Signature Trust Co./Cn=DST Root CA...
소스를
gem source -a http://gems.ruby-china.org/

3. cocoapods 설치 명령은 다음과 같습니다.
sudo gem install cocoapods

Mac 버전 시스템 버전이 업데이트되면 오류가 발생할 수 있습니다.
error:While executing gem ...(errno::erperm) Operation not permitted -/usr/bin/xcodeproj
다음 명령을 수행합니다.
sudo gem install -n /usr/local/bin cocoapods --pre

그런 다음 CocoaPods를 구성하고 명령을 입력합니다.
pod setup

기다리다성공 힌트가 있으면 설치가 됩니다.

좋은 웹페이지 즐겨찾기