El Capitan에서 포드를 업데이트하지 않는 Cocoa 포드
El Capitan으로 업그레이드 한 이후로 포드를 업데이트 할 수 없습니다.
$ pod update
-bash: pod: command not found
그래서 CocoaPods를 다시 설치하려고 시도했으며 다음과 같습니다.
$ sudo gem install cocoapods
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
나는이 컴퓨터의 관리자입니다. 왜 이런 일이 발생합니까?
이는 El Capitan에 도입 된 새로운 시스템 무결성 보호 기능으로 인해 발생합니다 . 관리자도에 쓰기를 제한합니다 /usr/bin
.
당신의 최선의 선택은 필요없이 gem을 설치하는 것 sudo
입니다. 이를 수행하는 방법에 대한 좋은 가이드가 있습니다 .
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH
gem install cocoapods
cocopods의 모든 인스턴스를 제거합니다 (안전하고 깨끗하게 유지하기 위해) Cocoapods 완전히 제거 참조
sudo gem uninstall cocoapods
또는 모든 구성 요소를 완전히 제거하고 각각에 대해 모든 버전을 선택하는 것이 좋습니다.
gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall
다시 설치
sudo gem install -n /usr/local/bin cocoapods
액세스 권한 변경
sudo chmod +rx /usr/local/bin/
이것은 당신을 위해 작동합니다
sudo gem install -n /usr/local/bin cocoapods
허용되지 않는 작업-/ usr / bin / xcodeproj # 3692
어떤 이유로 든 루트가없는 것은 단순히 시스템을 업그레이드 할 때 덜 제한적으로 보입니다. 10.10에서 업그레이드 한 컴퓨터에서 gem install cocoapods를 sudo 할 수 있지만 binstubs는 더 이상 / usr / bin에 설치되지 않습니다.
$ sudo gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:/Library/Ruby/bin
$ pod --version
0.37.2
일부 사용자로부터 시스템 전체 설치를 수행 할 때이 오류가 발생한다고 들었습니다.
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
gem이 일부 시스템에서 다르게 작동하는 이유는 확실하지 않지만
-n /usr/local/bin
install 명령 을 전달 하여 해결할 수 있으므로 pod 실행 파일이 여기에 설치됩니다.
원래 질문 / 문제에 대해 :
$ sudo gem install cocoapods
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted
I found I had the same problem with several GEMS, so I generalized the recognized answer (Keith Smiley) to update ALL local gems... (on El Capitan with rootless in force)
$ sudo gem install cocoapods -n /usr/local/bin/ # this command installs
$ sudo gem update -n /usr/local/bin/ # this command updates all local gems
This works well and will spit out a verbose log of all updates and errors.
I saw many errors. They were all 'unable to convert' errors. Parsing many docs will encounter a "skipping" error... like this:
$ unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/jazzy... skipping
I believe these skipping errors are not problems.
CocoaPods will be updated during this process, along with all the other local GEMS, depending on how current your local GEMS are. I believe this is the best way to handle the rootless issue (which is the cause of the problem).
Your best option for installing Pods for custom and standard installation Refer the Link :https://github.com/CocoaPods/CocoaPods/issues/3692
Did you install Xcode Command Line tools again ? That solved my problem. You need to select Command Line tool in Xcode preferences(Locations) and than install cocoa pods.
For me it worked with: sudo gem install -n /usr/local/bin cocoapods --pre
참고URL : https://stackoverflow.com/questions/33077977/cocoa-pods-not-updating-pods-on-el-capitan
'Development Tip' 카테고리의 다른 글
파일이 배치 스크립트의 디렉토리인지 테스트하는 방법은 무엇입니까? (0) | 2020.11.12 |
---|---|
Python에서 파일 내용을 읽고 쓰는 가장 쉬운 방법 (0) | 2020.11.12 |
didUpdateToLocation 대신 didUpdateLocations (0) | 2020.11.12 |
Android : getSupportActionBar ()는 ActionBarSherlock 라이브러리에서 항상 null을 반환합니다. (0) | 2020.11.12 |
캔버스에 맞게 이미지 크기 조정 (0) | 2020.11.12 |