Nice programing

Xcode 6 및 10.10 Yosemite가 포함 된 Cocoapods

nicepro 2020. 10. 22. 22:46
반응형

Xcode 6 및 10.10 Yosemite가 포함 된 Cocoapods


처음에 10.10 및 XCode6-Beta로 업그레이드 한 후 'pod update'를 실행하려고했는데이 오류가 발생했습니다.

cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)

'sudo gem install cocoapods'를 사용하여 Cocoapods를 업데이트하려고했지만 다른 오류가 발생했습니다.

Fetching: xcodeproj-0.17.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing cocoapods:
ERROR: Failed to build gem native extension.

"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext RUBYLIBDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  Check the mkmf.log file for more details.  You may need configuration options.

다른 사람이 10.10 Yosemite에서 Xcode 6과 함께 Cocoapods를 성공적으로 사용할 수 있었습니까?


  1. Xcode 6 열기
  2. 환경 설정 열기
  3. 위치 탭을 클릭하십시오.
  4. Command Line Tools버전을 다음으로 변경하십시오.Xcode 6.0
  5. Cocoapods 제거
    $ sudo gem uninstall cocoapods
  6. xcodeproj 제거 $ sudo gem uninstall xcodeproj
  7. xcodeproj 설치
    $ sudo gem install xcodeproj
  8. 코코아 포드 설치
    $ sudo gem install cocoapods
  9. 작동 pod --version하는지 확인하기 위해 실행

// 10.10 (14A343f)에서 Xcode6-Beta7 실행

위의 모든 것을 시도했지만 운이 없었습니다. 나를 위해 일한 것은 다음과 같습니다.

Homebrew 를 통해 최신 버전의 Ruby를 설치했습니다 (몇 분 걸렸습니다).

brew install ruby

그런 다음 평소와 같이 Cocoapods를 설치했습니다.

sudo gem install cocoapods

그리고 그것은 대접을 받았습니다!


다음과 같이하세요:

1- Xcode 6을 열고 기본 설정을 열고 위치 탭을 클릭 한 다음 명령 줄 도구 버전을 Xcode 6.0으로 변경합니다.

2- sudo gem 제거 cocoapods

3- sudo gem 제거 xcodeproj

4- 루비 -e "$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"

5- 컬 -L https://get.rvm.io | bash -s stable --ruby

6- 소스 /Users/your_user_name/.rvm/scripts/rvm

7- rvm 재로드

8- rvm rubygems 최신 --force

9- gem install xcodeproj

10 gem install cocoapods

8- 포드-버전


cocoapod를 제거하고 xcodeproj gem을 설치하는 것 외에도. 또한 rvm에게 시스템 루비를 사용하도록 지시해야했습니다. 6.0.0 명령 줄 도구를 사용하도록 전환 한 후 시스템 버전과 마찬가지로 rvm 설치가 2.0.0이기 때문에 이상합니다.

rvm use system    
sudo gem uninstall cocoapods
sudo gem install xcodeproj
sudo gem install cocoapods
pod install

Okay, looks like it's been reported and has a workaround: https://github.com/CocoaPods/CocoaPods/issues/2219

The following worked for me:

sudo gem uninstall cocoapods
sudo gem install xcodeproj
sudo gem install cocoapods
pod update

Try it:

/usr/bin/login -f your_mac_username

cd "to your project"

pod install

Done.


Xcode 6.0 GM is missing the 10.10 SDK and therefore the gem xcodeproj can't be compiled which has some C code in it which needs the 10.10 SDK. This is going to be fixed in the future. For now you can work around it like this (no need for rvm or anything else):

  • Terminal: sudo gem uninstall cocoapods xcodeproj
  • Download Xcode 6.1 (right now Beta 2 is the current one)
  • Start it go to Settings -> Location -> Command Line Tools -> Change to Xcode 6.1 Beta
  • Terminal: sudo gem install cocoapods
  • Change your Command Line tools back to GM (if you want/need)

For more information see: https://github.com/CocoaPods/CocoaPods/issues/2432


We released CocoaPods 0.34 which no longer has any C based extensions and will install without even installing Xcode, thus should be able to work around this tough setup that Apple gave us all.


i found this solution in this link

$sudo ln -s /Applications/Xcode6-Beta7.app /Applications/Xcode.app $sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.Internal.sdk $ sudo gem install cocoapods

once the installation done, you can delete the links like so :

$ rm /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.Internal.sdk $ rm /Applications/Xcode.app


I have figured out that simply deleting ~/.rvm folder resolves whatever problems arise from version, ACL, and configuration conflicts. All your gems will have to be reinstalled but this is the simplest solution I've found. You can continue using Xcode 5 (no switch required). So simply run

> sudo rm -rf ~/.rvm

in shell.


I tried all the steps in Kyle Robson answer. The update to Yosemite Dev Preview 8 resolved the problem for me.


I solved this problem by re-downloading the latest version of the Command Line Tools for 10.10


Try this:

sudo gem uninstall cocoapods
sudo gem install cocoapods
$ pod repo remove master
$ pod setup
$ pod install

참고URL : https://stackoverflow.com/questions/24018355/cocoapods-with-xcode-6-and-10-10-yosemite

반응형