Question

Après une première mise à niveau vers 10.10 et XCode6-Beta, j'ai essayé d'exécuter « pod update » et j'ai reçu cette erreur :

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

J'ai essayé de mettre à jour Cocoapods en utilisant « sudo gem install cocoapods », mais j'ai reçu une autre erreur :

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.

Quelqu'un d'autre a-t-il réussi à utiliser Cocoapods avec Xcode 6 sur 10.10 Yosemite ?

Était-ce utile?

La solution

  1. Ouvrez Xcode 6
  2. Ouvrir les préférences
  3. Cliquez sur l'onglet Emplacements
  4. Changer la Command Line Tools version à Xcode 6.0
  5. Désinstaller les cocoapods
    $ sudo gem uninstall cocoapods
  6. Désinstaller xcodeproj$ sudo gem uninstall xcodeproj
  7. Installer xcodeproj
    $ sudo gem install xcodeproj
  8. Installer des cocoapodes
    $ sudo gem install cocoapods
  9. Courir pod --version pour vérifier que ça a fonctionné

Autres conseils

// exécutant xcode6-beta7 sur 10.10 (14a343f)

J'ai essayé tout ce qui précède et j'ai eu de la chance.Voici ce qui a fonctionné pour moi:

J'ai installé la dernière version de Ruby via homebrew (a pris quelques minutes)

brew install ruby

puis installé des cacoapodes comme d'habitude

sudo gem install cocoapods

et cela a fonctionné un régal!

Suivez ces étapes:

1- Ouvrez Xcode 6, ouvre des préférences, cliquez sur l'onglet Emplacements, modifiez la version de la ligne de commande en Xcode 6.0

2- Sudo GEM Désinstallation Cocoapodes

3- Sudo GEM Désinstallez XCodeProj

4- Ruby -e "$ (curl -fssl https://raw.githubusercontent.com/homebrew/Installation / maître / installation ) "

5- CURL -L https://get.rvm.io |Bash -s Stable --Ruby

6- Source /USERSERS/YOUR_USER_NAME/.RVM/SCRIPTS/RVM

7- RVM Recharge

8- RVM Rubygems Dernier --force

9- GEM Installez XCodeProj

10- GEM Installez Cocoapodes

8- Pod --version

In addition to uninstalling cocoapods and installing xcodeproj gems. I also had to tell rvm to use the system ruby. Strange because my rvm install was 2.0.0 as was the system version after switching to use 6.0.0 Command Line Tools

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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top