when running pod install I get The `master` repo requires CocoaPods 0.32.1, try updating but still in 0.31

后端 未结 5 1890
遇见更好的自我
遇见更好的自我 2020-12-01 03:43

Iam trying to install cocoa pods in a xcode project, but when doing:

$ pod install

I get the following error:

Setting up Co         


        
相关标签:
5条回答
  • 2020-12-01 04:08

    To update cocoapods just do

    sudo gem install cocoapods
    

    and then you should be at the correct version

    0 讨论(0)
  • 2020-12-01 04:08

    To update the version you must reinstall cocoapods:

    sudo gem install cocoapods
    

    The next step is You are going to Have to manually delete any copies of the Specs Local repository and re-clone the new version of the repository Specs. You can do that With the Following commands:

    sudo rm -fr ~/.cocoapods/repos/master
    pod setup
    

    Finally:

    pod install
    
    0 讨论(0)
  • 2020-12-01 04:09

    I had the same issue. I tried

    sudo gem uninstall cocoapods
    

    and then

    sudo gem install cocoapods
    

    but it wasn't working. It finally worked when I restarted Terminal after the uninstall. Then the install worked.

    0 讨论(0)
  • 2020-12-01 04:10

    that's what worked for me:

    1. Uninstall CocoaPods (choose to uninstall all versions):

      sudo gem uninstall cocoapods

    2. Remove old master repo:

      sudo rm -fr ~/.cocoapods/repos/master

    3. Update gems as user installed:

      sudo gem update --system --user-install

    4. Add local gem path:

      echo 'export PATH="$PATH:/Users/%username%/.gem/ruby/2.0.0/bin"' >> ~/.bash_login

    5. Install CocoaPods without sudo:

      gem install --user-install cocoapods

    6. Setup CocoaPods and Master repo:

      pod setup

    make sure you are not running no-sudo commands from sudo terminal window/tab and relaunch or add new tap after exporting path

    0 讨论(0)
  • 2020-12-01 04:13

    This is what worked for me.

    1. Uninstall CocoaPods (choose to uninstall all versions):

      sudo gem uninstall cocoapods

    2. Remove old master repo:

      sudo rm -fr ~/.cocoapods/repos/master

    3. Install CocoaPods without sudo:

      gem install --user-install cocoapods

    4. Setup CocoaPods and Master repo:

      pod setup

    NOTE: Step 3 is going to make sure you install pod under your user name instead of root which sudo does.

    0 讨论(0)
提交回复
热议问题